Using a local module instead of a system-installed module (Python 2.xx)

I have a cluster system that works with Python and some modules installed on this system — however, I wanted to use the latest version of the module — it has several methods that are not present in older versions, so I built them and it is located locally in the area that I have access to:

# From my home directory: /gpfs/env/yrq12edu

# Get the source I need for the up to date version of the module I want to install locally.
svn co svn://svn.code.sf.net/p/simupop/code/trunk simuPOP

# Install PCRE stuff...
cd pcre-8.34
./configure --prefix=/gpfs/env/yrq12edu/pcre_install
make
make install
export PATH=/gpfs/env/yrq12edu/pcre_install/bin:$PATH
export LD_LIBRARY_PATH=/gpfs/env/yrq12edu/pcre_install/lib:$LD_LIBRARY_PATH
cd ..

# Install Swig Stuff...
cd swig-3.0.0
./configure --prefix=/gpfs/env/yrq12edu/swig_install
make
make install
export PATH=/gpfs/env/yrq12edu/swig_install/bin:$PATH
cd ..

export PYTHONPATH=/gpfs/env/yrq12edu/PythonModules/lib/python2.7/site-packages

# Build the up to date simuPOP module I need locally...
cd simuPOP
python setup.py install --prefix=/gpfs/env/yrq12edu/PythonModules 

, Python , ? , , PYTHONPATH , , , , , , . Python , - , ?

, .

+4
1

docs Python , . , sys.path( ).

, , . sys.path, , sys.path, Python .

0

Source: https://habr.com/ru/post/1540224/


All Articles