TGAC / KAT

The K-mer Analysis Toolkit (KAT) contains a number of tools that analyse and compare K-mer spectra.
http://www.earlham.ac.uk/kat-tools
GNU General Public License v3.0
206 stars 52 forks source link

error when installing using a prefix directory #127

Open najoshi opened 5 years ago

najoshi commented 5 years ago

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:

software/kat/2.4.2/lssc0-linux/lib/python3.7/site-packages/

and your PYTHONPATH environment variable currently contains:

'/software/kat/2.4.2/lssc0-linux/lib/python3.7/site-packages:/software/anaconda3/4.5.12/lssc0-linux/lib/python3.7/site-packages'

Here are some of your options for correcting the problem:

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

hermannschwaerzlerUIBK commented 4 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