python 2.7 - Installing software in home directory instead of /usr/bin/ in a server -


i'm running python codes in server have been connected via ssh. however, update/install few external libraries python.

since not sudo user, not able usual

pip install ....  

as error, example when tried installing pyfits:

 error: not create '/usr/lib64/python2.7/site-packages/pyfits': permission denied 

now, there 2 questions, have been trying find answers for:

  1. how update/install new libraries in home directory instead of default /usr/bin/..../ ?
  2. how make software (python in case) understand have installed new library in home directory ?

to install modules in home directory -
pip install --user $package_name
should trick.
install package in $home/.local/bin/$package , rest of package in $home/.local/lib/pythonx/site-packages/.


Comments

Popular posts from this blog

angular - Ionic slides - dynamically add slides before and after -

minify - Minimizing css files -

Add a dynamic header in angular 2 http provider -