Add a warning if pip installs packages outside of sys.path
See original GitHub issueWhat’s the problem this feature will solve?
Help users understand the issue.
Describe the solution you’d like
$ pip install foobar
Downloading foobar-1.2.3-py3-none-any.whl (1.6 MB)
|████████████████████████████████| 1.6 MB 31.9 MB/s
Installing collected packages: foobar
WARNING: pip is installing foobar to /home/foo/my-site-packages that is not present in sys.path
Successfully installed foobar-1.2.3
cf https://github.com/pypa/get-pip/issues/124
Alternative Solutions
As an alternative (or in addition), it would be nice for pip debug
to advertise the installation scheme
Additional context
Of course, the warning would not appear when using pip
with --target
/ --prefix
/ --root
.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
pip installs packages successfully, but executables not found ...
I know the question asks about macOS, but here is a solution for Linux users who arrive here via Google. I was having...
Read more >With Enum34 installed on python3.6+, pip picks up ... - GitHub
When the enum34 package is installed on a system, pip will no longer install a project that uses pyproject.toml instead of setup.py.
Read more >Installing Packages - Python Packaging User Guide - Python.org
(Starting in version 10, pip displays a warning when installing any scripts to a directory outside PATH .) If the scripts are not...
Read more >PIP Install Environment - ActiveState
Add Pip to Windows Environment Variables · Open up the Control Panel and navigate to System and Security > System · Click on...
Read more >Unresolved references to editable packages (pip install
Currently if you install a site-package in such a way that it creates an .egg-link file pycharm does not recognize it, or add...
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
Ah yes,
.pydistutils.cfg
. So let’s go with a warning that says in effect “your system is badly configured, this is not pip’s fault” and adding the install scheme topip debug
. That sounds like the correct balance of being helpful without making it our problem, to me.I can understand the benefit in helping people to debug an otherwise weird issue. But I’d make the warning significantly stronger, something like “WARNING: Your system is misconfigured so that pip installs to a location not on sys.path. If you did not change the configuration yourself, please report this issue to your Python distributor.” The key is I want people to know that it’s a system issue and not to report it to pip. Otherwise there’s no benefit, as they still come to us and we still spend time diagnosing and sending them on to the right place.
(Although I’m definitely losing patience with having to check even the most basic of assumptions because Debian violates them - I’d be quite happy to not include this check if it’s Debian-specific).