[BUG] dead link in "bad install directory or PYTHONPATH" error/warning message
See original GitHub issuesetuptools version
49.2.1
Python version
3.10
OS
Windows
Additional environment information
No response
Description
Executing python setup.py install --prefix=<path>
, when <path>
is not in PYTHONPATH
and is not a site dir, displays a “bad install directory or PYTHONPATH” message with a dead link:
https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations
Expected behavior
The link should be valid, or should not be displayed at all.
How to Reproduce
Execute python setup.py install --prefix=<dir>
where <dir>
is not in PYTHONPATH
and is not a site dir.
Output
In the following, I have replaced actual paths with <path>
, <path1>
, and <path2>
.
'From setuptools
running build
running build_py
creating <path>
creating <path>
copying <path1> -> <path2>
warning: build_py: byte-compiling is disabled, skipping.
running install
Checking .pth file support in <path>
<path>\pythonw.exe -E -c pass
TEST FAILED: <path>\Lib\site-packages\ does NOT support .pth files
bad install directory or PYTHONPATH
You are attempting to install a package to a directory that is not
on PYTHONPATH and which Python does not read ".pth" files from. The
installation directory you specified (via --install-dir, --prefix, or
the distutils default setting) was:
<path>\Lib\site-packages\
and your PYTHONPATH environment variable currently contains:
''
Here are some of your options for correcting the problem:
* You can choose a different installation directory, i.e., one that is
on PYTHONPATH or supports .pth files
* You can add the installation directory to the PYTHONPATH environment
variable. (It must then also be on PYTHONPATH whenever you run
Python and want to use the package(s) you are installing.)
* You can set up the installation directory to support ".pth" files by
using one of the approaches described here:
https://setuptools.readthedocs.io/en/latest/easy_install.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
0 - Stack Overflow
pth files error: bad install directory or PYTHONPATH You are attempting to install a package to a directory that is not on PYTHONPATH...
Read more >Nmap Change Log
List of the most recent changes to the free Nmap Security Scanner. ... in debug output nor a "ERROR: script execution failed" message...
Read more >Configuration Reference — Airflow Documentation
This page contains the list of all the available Airflow configurations that you can set in airflow.cfg file or using environment variables.
Read more >Bug List
Please install the XDCtools of this version, or migrate the project to one of ... Wrong message are used for "Probably Error" items...
Read more >Untitled
Filter out bad requires (bug #59819). - Put pstoimg and texexpand in tetex-latex where they belong. - Adjust file list counts for sanity...
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
Yes, I’ll close it.
I see! Yes it does look like the link was changed to the updated URL. Should we close this issue then?