Jan 15 2018

Installing Python modules without root
3  282 {{}}
Python is a very easy-to-learn programming language yet very powerful. So many people code in python. and python has so much libraries for you to use, that you will need them, but can't use them because you are not root, right? but python has its own container for that, it's virtualenv. So let's see how we can install them: first download it's source, the latest one is 15.1.0, so we will use that


then extrace it:
tar -xvf virtualenv-15.1.0.tar.gz

then cd into the directory:
cd virtualenv-15.1.0

then install the virtual env binaries: we will be installing that to a directory named proj in home so
For Python 2
./ ~/proj

For Python 3
./ --python=/usr/bin/python3.4 ~/proj

and then cd to home:
cd ~

then activate the virtualenv:
source ~/proj/bin/activate

Voila! Your python container is active! So now to install your packages just use pip, eg:
pip install

So the thing is that you will have to do the `source ~/proj/bin/activate` everytime you login, to avoid that type this:
echo "source ~/proj/bin/activate" >> ~/.bashrc

Credits for this tutorial go to Noteness who created this tutorial (but in the wrong forum section :p)
If eveything between `'s could use the class="code", that'd be great.. :s
RoMBot    Jan 15 2018
Use [code] tag
Staff StephenS    Jan 15 2018
Thanks \o/
RoMBot    Jan 16 2018

Please Login or Sign Up to leave a reply.