I'm running in to a problem compiling sphinxbase: I can successfulyl run configure and make, but I run in to an error on make install (below). I can't figure out how to change the PYTHONPATH variable, despite the suggestions included in the error. Can anyone suggest a way around this? Thanks!
make[2]: Entering directory `/home/deadrabbit/Desktop/sphinxbase-0.4/python'
/usr/bin/python setup.py install --prefix /usr/local
running install
Checking .pth file support in /usr/local/lib/python2.5/site-packages/
/usr/bin/python -E -c pass
TEST FAILED: /usr/local/lib/python2.5/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/lib/python2.5/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:
Thanks for the tip - I neglected to say that I already tried to manually set the PYTHONPATH variable from BASH, but it still returns the same error. The python binary in the above output is called with the -E flag, which ignores environment variables. Is there a way to call python without the -E flage? I can't figure out a place to change it in setup.py, but I'm not sure that's correct place to look.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
It's still not working for me - the output from running those commands is below. My version of python updated to 2.6 yesterday, I'm hoping that won't add any complications. In my python man page, it says: "-E Ignore environment variables like PYTHONPATH and PYTHONHOME that modify the behavior of the interpreter.", which is what appears to be happening. I wish I could figure out where "python -E -c" is being called so I could just change it. It doesn't seem to be in the sphinxbase source, I grepped those files for "python -E". Thanks again for your help.
clover:python $ export PYTHONPATH=/usr/local/lib/python2.6/site-packages/
clover:python $ echo $PYTHONPATH
/usr/local/lib/python2.6/site-packages/
clover:python $ sudo python setup.py install --prefix /usr/local
running install
Checking .pth file support in /usr/local/lib/python2.6/site-packages/
/usr/bin/python -E -c pass
TEST FAILED: /usr/local/lib/python2.6/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/lib/python2.6/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:
I'm running in to a problem compiling sphinxbase: I can successfulyl run configure and make, but I run in to an error on make install (below). I can't figure out how to change the PYTHONPATH variable, despite the suggestions included in the error. Can anyone suggest a way around this? Thanks!
make[2]: Entering directory `/home/deadrabbit/Desktop/sphinxbase-0.4/python'
/usr/bin/python setup.py install --prefix /usr/local
running install
Checking .pth file support in /usr/local/lib/python2.5/site-packages/
/usr/bin/python -E -c pass
TEST FAILED: /usr/local/lib/python2.5/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:
http://peak.telecommunity.com/EasyInstall.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
make[2]: [install-exec-local] Error 1
make[2]: Leaving directory
/home/deadrabbit/Desktop/sphinxbase-0.4/python' make[1]: *** [install-am] Error 2 make[1]: Leaving directory
/home/deadrabbit/Desktop/sphinxbase-0.4/python'make: [install-recursive] Error 1
That did it! I can't believe I overlooked that - thanks for your help.
run
export PYTHONPATH=/usr/local/lib/python2.5/site-packages
before running make install
Thanks for the tip - I neglected to say that I already tried to manually set the PYTHONPATH variable from BASH, but it still returns the same error. The python binary in the above output is called with the -E flag, which ignores environment variables. Is there a way to call python without the -E flage? I can't figure out a place to change it in setup.py, but I'm not sure that's correct place to look.
The fact it prints -E doesn't mean it ignores environment. If you don't believe me, look at my log:
[shmyrev@gnome python]$ export PYTHONPATH=/home/shmyrev/local/lib/python2.5/site-packages/
[shmyrev@gnome python]$ /usr/bin/python setup.py install --prefix /home/shmyrev/local
running install
running bdist_egg
running egg_info
writing SphinxBase.egg-info/PKG-INFO
writing top-level names to SphinxBase.egg-info/top_level.txt
writing dependency_links to SphinxBase.egg-info/dependency_links.txt
writing manifest file 'SphinxBase.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-i686/egg
running install_lib
running build_ext
creating build/bdist.linux-i686/egg
copying build/lib.linux-i686-2.5/sphinxbase.so -> build/bdist.linux-i686/egg
creating stub loader for sphinxbase.so
byte-compiling build/bdist.linux-i686/egg/sphinxbase.py to sphinxbase.pyc
creating build/bdist.linux-i686/egg/EGG-INFO
writing SphinxBase.egg-info/native_libs.txt
copying SphinxBase.egg-info/PKG-INFO -> build/bdist.linux-i686/egg/EGG-INFO
copying SphinxBase.egg-info/SOURCES.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying SphinxBase.egg-info/dependency_links.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying SphinxBase.egg-info/native_libs.txt -> build/bdist.linux-i686/egg/EGG-INFO
copying SphinxBase.egg-info/top_level.txt -> build/bdist.linux-i686/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/SphinxBase-0.4.99-py2.5-linux-i686.egg' and adding 'build/bdist.linux-i686/egg' to it
removing 'build/bdist.linux-i686/egg' (and everything under it)
Processing SphinxBase-0.4.99-py2.5-linux-i686.egg
Removing /home/shmyrev/local/lib/python2.5/site-packages/SphinxBase-0.4.99-py2.5-linux-i686.egg
Copying SphinxBase-0.4.99-py2.5-linux-i686.egg to /home/shmyrev/local/lib/python2.5/site-packages
SphinxBase 0.4.99 is already the active version in easy-install.pth
Installed /home/shmyrev/local/lib/python2.5/site-packages/SphinxBase-0.4.99-py2.5-linux-i686.egg
Processing dependencies for SphinxBase==0.4.99
Finished processing dependencies for SphinxBase==0.4.99
It's still not working for me - the output from running those commands is below. My version of python updated to 2.6 yesterday, I'm hoping that won't add any complications. In my python man page, it says: "-E Ignore environment variables like PYTHONPATH and PYTHONHOME that modify the behavior of the interpreter.", which is what appears to be happening. I wish I could figure out where "python -E -c" is being called so I could just change it. It doesn't seem to be in the sphinxbase source, I grepped those files for "python -E". Thanks again for your help.
clover:python $ export PYTHONPATH=/usr/local/lib/python2.6/site-packages/
clover:python $ echo $PYTHONPATH
/usr/local/lib/python2.6/site-packages/
clover:python $ sudo python setup.py install --prefix /usr/local
running install
Checking .pth file support in /usr/local/lib/python2.6/site-packages/
/usr/bin/python -E -c pass
TEST FAILED: /usr/local/lib/python2.6/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:
http://peak.telecommunity.com/EasyInstall.html#custom-installation-locations
Please make the appropriate changes for your system and try again.
sudo uses root's environment, not your one. Do su -, then type password, then export PYTHONPATH, then make install.