Environment markers don't work with editable on local path?
See original GitHub issueEnvironment
- pip version: 20.1.1
- Python version: 3.6.9
- OS: Linux x86_64 (Ubuntu 18.04)
Description
This is a reply to/follow-up on #4530, as that issue is locked: it seems that quoting is needed when using markers on an editable install. This works when installing from a URL, but doesn’t seem to work when installing from a local file.
E.g. this works as expected:
-e 'git+http://example.com/NOT_EXISTING.git#egg=foo ; python_version >= "3.10"'
but this doesn’t:
-e 'path/to/local/project/ ; python_version >= "3.10"'
Expected behavior
path/to/local/project/
to not be installed
How to Reproduce
Create a requirements.txt
file with:
-e 'path/to/local/project/ ; python_version >= "3.10"'
and install it with pip install -r requirements.txt
.
Output
$ pip install -r requirements.txt
ERROR: path/to/local/project/ ; python_version >= "3.10" is not a valid editable requirement. It should either be a path to a local project or a VCS URL (beginning with svn+, git+, hg+, or bzr+).
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
marker icon isn't showing in Leaflet - Stack Overflow
I'm using nextjs and this almost worked for me. It wants a specific path instead of an imported image. Say your icon is...
Read more >Dependency specification | Documentation | Poetry - Python ...
Before poetry 1.1 directory path dependencies were installed in editable mode by default. You should set the develop attribute explicitly, to make sure...
Read more >pip install - pip documentation v22.3.1
Install a project in editable mode (i.e. setuptools “develop mode”) from a local project path or a VCS url. --dry-run#. Don't actually install...
Read more >Configuration - Sphinx documentation
Builder" means the Builder class in the sphinx.builders module. Remember that document names use / as the path separator and don't contain the...
Read more >Troubleshooting - Unity - Manual
If you are trying to install a new package from the registry and it is not working, it might be due to permission...
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 Free
Top 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
Editable is convenient for development, but IMO a “proper” package should be used in a tox environment. This would avoid you accidentally introduce package problems (especially manifest-related). IIRC tox can detect package updates and automatically re-install, so there’s not much benefit to use editable there.
For the record: I agree (though for packages only used for development/tests this can end up having a lower priority unfortunately), hence the “This is definitely not the best setup” 😉