I am setting-up a ubuntu 15.10 vm (win7 virtualbox host) and want to use python for some machine learning experiments using python (i will need numpy, scipy, sklearn, matplotlib, xgboost).
As i know from past experience that dependencies can be tricky and that those lirabries don't always install straightaway, i would like to use virtualenv.
Virtualenv installation doc recommends using pip to install packages, ok but now when i list the python versions available on my box, i find 5 of them (in case you wonder, this comes from a vanilla 15.10 installation...):
hippo@u64-ml:~$ sudo find / -type f -executable -iname 'python*' -exec file -i '{}' \; | awk -F: '/x-executable; charset=binary/ {print $1}'
/usr/bin/python3.4
/usr/bin/python3.4m
/usr/bin/python2.7
/usr/bin/python3.5m
/usr/bin/python3.5
So now i am unsure of:
1/ how to make sure that the virtualenvs i create are for a given python version?
2/ how do i install packages for say python3.5? if i use pip3 i don't know where it will put its binaries and how python will find them (is it for python3.4, 3.4m, 3.5, 3.5m?).
EDIT with results from answer below:
hippo@u64-ml:~$ virtualenv -p python3.5 hippo3.5
Running virtualenv with interpreter /usr/bin/python3.5
Using base prefix '/usr'
New python executable in hippo3.5/bin/python3.5
Also creating executable in hippo3.5/bin/python
Installing setuptools, pip...done. ## installs the right pip
hippo@u64-ml:~$ which pip
hippo@u64-ml:~$ source hippo3.5/bin/activate ## now when i activate the env, all works perfect!!
(hippo3.5)hippo@u64-ml:~$ which pip
/home/hippo/hippo3.5/bin/pip
(hippo3.5)hippo@u64-ml:~$ which python
/home/hippo/hippo3.5/bin/python
which -a pythonwhich -a python3will show you them all