
Virtualenv -no-site-packages -p root/bin/python3.x envĪt "python_versions/" create files like this: env_python3x.bash: You'll get directories like this:Īt each "Python-3.x.y/" directory, do the following (do NOT use "sudo" in any of the steps!): mkdir root Python_versions/ : download Python-*.tgz packages here and "tar xvf" them.
Don't touch your system's default python3 version though.ĭownload source for different python versions under the following directory structure: $HOME/ If you have several extra python versions installed in some other way, get rid of them, e.g., remove $HOME/.local/lib/python3.x, etc. Openssl libssl-dev libffi-dev unzip pciutils net-tools \
Sudo apt-get install -y zlib1g zlib1g-dev libsqlite3-dev \ Sudo apt-get install -y build-essential cmake Sudo apt-get install software-properties-common Prerequisites: If you are using some bare-bones thin client with no extra turf installed, you should run this first (in ubuntu 18.04 at least, extra packages added for convenience): sudo apt-get update
Each Python version is isolated with virtualenv. Does not mangle your system's default Python installation in any way. Each Python version is compiled from source. Type "help", "copyright", "credits" or "license" for more information. Warning: no previously-included files matching '*.py' found under directory '*'Ĭhanging mode of build/scripts-2.7/django-admin.py from 644 to 755Ĭhanging mode of /usr/local/bin/django-admin.py to 755 Warning: no previously-included files matching '_pycache_' found under directory '*' Running setup.py egg_info for package django Installing pip-2.7 script to /usr/local/binĭownloading Django-1.5.1.tar.gz (8.0Mb): 8.0Mb downloaded Anyway, this is what I did to install Django for Python 2.7 on Ubuntu 12.10: $ sudo easy_install-2.7 pip So apparently there are multiple versions of easy_install and pip. You should use the following if you have pip >= 1.5: $ pip2.6 install otherpackage Since version 0.8, Pip supports pip-: $ pip-2.5 install myfoopackageĮDIT: pip changed its schema to use pipVERSION instead of pip-VERSION in version 1.5. For example: # The system default python: This is the recommendation because it works across all versions of Python, and in all forms of virtualenv. The current recommendation is to use python -m pip, where python is the version of Python you would like to use.