Bad install directory or PYTHONPATH

3,640 views
Skip to first unread message

ashwinD12

unread,
Jun 20, 2016, 11:46:01 AM6/20/16
to h5py
I am using LDSHARED="icc -shared" CC=icc python3.4 setup.py install --prefix=/usr/local/lib and I get this error,

Actually I have my pythone3.4 installed under /usr/local/lib/python3.4/distutils. So why is it going here ?

running install
Checking .pth file support in /usr/local/install/lib/python3.4/site-packages/
/usr/bin/python3.4 -E -c pass
TEST FAILED: /usr/local/install/lib/python3.4/site-packages/ does NOT support .pth files
error: 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:

/usr/local/install/lib/python3.4/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://pythonhosted.org/setuptools/easy_install.html#custom-installation-locations

Please make the appropriate changes for your system and try again.

Pierre Complex

unread,
Jun 22, 2016, 10:08:07 AM6/22/16
to h5py
Hi,

1. There is a mismatch in the paths between your command line prefix "/usr/local/lib" and the error message "/usr/local/install/lib".

2. What do

which python

echo $PYTHONPATH

return?
Reply all
Reply to author
Forward
0 new messages