Open najoshi opened 5 years ago
Hi @najoshi,
I had the very same problem. The underlying bug is that somewhere the leading /
is removed from the prefix path rendering it an invalid path as it is relative to the scripts directory!
My workaround was to create a symbolic link inside the scripts directory before running make install
. This means that in the scripts directory the relative path is pointing to the correct location:
INSTALL_DIR=/your/preferred/installation/directory
...
./configure --prefix=$INSTALL_DIR
make
TOPDIR=${INSTALL_DIR#/}; TOPDIR=${TOPDIR%%/*}
ln -s /$TOPDIR scripts/$TOPDIR
make install
I get the error below when trying to install using a prefix (from the configure step). It seems like it is, for some reason, stripping the first forward slash from the prefix directory when running some test and it fails.
make[1]: Entering directory '/data/joshi/KAT/scripts' make install-exec-hook make[2]: Entering directory '/data/joshi/KAT/scripts' /software/anaconda3/4.5.12/lssc0-linux/bin/python3 setup.py install --root= --prefix=/software/kat/2.4.2/lssc0-linux --record install_files.txt running install Checking .pth file support in software/kat/2.4.2/lssc0-linux/lib/python3.7/site-packages/ /software/anaconda3/4.5.12/lssc0-linux/bin/python3 -E -c pass TEST FAILED: software/kat/2.4.2/lssc0-linux/lib/python3.7/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:
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. Makefile:509: recipe for target 'install-exec-hook' failed make[2]: [install-exec-hook] Error 1 make[2]: Leaving directory '/data/joshi/KAT/scripts' Makefile:433: recipe for target 'install-exec-am' failed make[1]: [install-exec-am] Error 2 make[1]: Leaving directory '/data/joshi/KAT/scripts' Makefile:379: recipe for target 'install-am' failed make: *** [install-am] Error 2