question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Environment markers don't work with editable on local path?

See original GitHub issue

Environment

  • 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:open
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
uranusjrcommented, Jul 28, 2020

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.

0reactions
ghostcommented, Jul 28, 2020

… but IMO a “proper” package should be used in a tox environment …

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” 😉

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found