Error when adding package: EmptyConstraint instance has no attribute 'min'
See original GitHub issue- I am on the latest Poetry version.
- I have searched the issues of this repo and believe that this is not a duplicate.
- If an exception occurs when executing a command, I executed it again in debug mode (
-vvv
option).
- OS version and name: macOS 10.13.6
- Poetry version: 0.12.3
- Link of a Gist with the contents of your pyproject.toml file: https://gist.github.com/bi1yeu/41b2180afd838560daa0faf68e9c236b
Issue
Hi! This is my first time attempting to use poetry. I created a new empty project with this command:
$ poetry new example
Then, from within the example
directory, I attempt to add the jupyter
package:
$ poetry add jupyter
Using version ^1.0 for jupyter
Updating dependencies
Resolving dependencies... (4.0s)
[AttributeError]
EmptyConstraint instance has no attribute 'min'
add [-D|--dev] [--git GIT] [--path PATH] [-E|--extras EXTRAS] [--optional] [--python PYTHON] [--platform PLATFORM] [--allow-prereleases] [--dry-run] [--] <name> (<name>)...
Verbose output is contained within the gist linked above. I am able to add other packages without apparent error. Happy to provide additional info.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:28 (7 by maintainers)
Top Results From Across the Web
Error when adding package: EmptyConstraint instance has no ...
This fails with the same AttributeError as above if I instead use pyenv local 2.7.10 . I can install jupyter directly using pip...
Read more >'EmptyConstraint' object has no attribute 'min' with pytest and ...
'EmptyConstraint' object has no attribute 'min' with pytest and Python 2.7.
Read more >Python: instance has no attribute - Stack Overflow
the error means the class Residues doesn't have a function call atoms. The solution could be as follows:
Read more >Pyomo Documentation - Read the Docs
The standard utility for installing Python packages is pip. ... ERROR: AttributeError: 'IndexedVar' object has no attribute 'is_binary'.
Read more >User's Manual for CPLEX - FTP Directory Listing - IBM
This guide contains important information on the procedures and practices followed in the service and support of your IBM products.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I’m experiencing this same issue with Poetry 1.1.4 when trying to install certain packages. I was able to get around the issue following a similar approach that @bnoctis and @agilgur5 detailed above. However, for a more recent vendorized install, the file I had to modify was
~/.poetry/lib/poetry/_vendor/py3.8/poetry/core/packages/dependency.py
(where python3.8 is my active interpreter).Here’s a diff of the modifications I made, hopefully others find this useful:
System: MacOS Poetry: 1.1.4
I had to edit
~/.poetry/lib/poetry/_vendor/py3.8/poetry/core/version/markers.py
and line 281 in the definition of
validate(self, environment)
, added: