Dec 02 2015

Install Python modules without root
3  922 {{}}
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 13.1.2, so we will use that
then extrace it:
tar -xvf virtualenv-13.1.2.tar.gz
then cd into the directory:
cd virtualenv-13.1.2
then install the virtual env binaries: we will be installing that to a directory named proj in home so
./ ~/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 pika
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
So now, your virtualenv will be activated eveytime you login :D Cheers! And send me ponies!
Again, this should be in Tutorials section.
Staff StephenS    Dec 07 2015
Great guide!
RoMBot    Oct 29 2016
I'm getting:

<code>Command "python egg_info" failed with error code 1 in /home/K/KiDo/.tmp /pip-build-XcBMuj/aiohttp/ </code>

when I try:

pip install -U[voice]
KiDo    Jun 26 2017

Please Login or Sign Up to leave a reply.