From: Subhodip B. <sub...@gm...> - 2011-09-05 21:20:32
|
Hi all, I am using Jython 2.5.1 for my project. I am trying to run a jython code using the Jython-plugin of Hudson. My jython code needs third party modules to run files. So apparently I am trying to write a code that can install a package using easy_install to a custom location(may be in my project tree), so that the modules are always available. while trying to execute the code I get this error : ---------------------------------------------------------------------------------------- Base dir My\PROJECT\ '-E' is not recognized as an internal or external command, operable program or batch file. TEST FAILED: My\PROJECT\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: MY\PROJECT\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: http://peak.telecommunity.com/EasyInstall.html#custom-installation-locations Please make the appropriate changes for your system and try again. --------------------------------------------------------------------------------------- I followed the instruction i.e created a altinstallation.pth file which contains : a single line import os, site; site.addsitedir(os.path.expanduser('MY\PROJECT\site-packages')) I have also created distutils.cfg file and have the entries : [install] install_lib = MY\PROJECT\site-packages # This next line is optional but often quite useful; it directs EasyInstall # and the distutils to install scripts in the user's "bin" directory. For # Mac OS X framework Python builds, you should use /usr/local/bin instead, # because neither ~/bin nor the default script installation location are on # the system PATH. # install_scripts = MY\PROJECT\site-packages\bin But still no help. Googling also does not reveal much. As the backslashes suggest i am on a windows machine. In some cases i do get the python path(all default site packages and libs) with my custom directory in the path too but with the same error. Where am I going wrong here? ------------- Regards Subhodip Biswas GPG key : FAEA34AB Server : pgp.mit.edu http://subhodipbiswas.wordpress.com http:/www.fedoraproject.org/wiki/SubhodipBiswas |