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.

Add a warning if pip installs packages outside of sys.path

See original GitHub issue

What’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:open
  • Created 2 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
pfmoorecommented, Aug 28, 2021

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 to pip debug. That sounds like the correct balance of being helpful without making it our problem, to me.

2reactions
pfmoorecommented, Aug 27, 2021

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).

Read more comments on GitHub >

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

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