So I went with a colleagues suggestion of VMWare Player 6, and installed Ubuntu.
After breaking a couple installs and recreating VMs left and right, I finally have a process to install and work with multiple versions of Python.
First up, get a whole bunch of dependencies:
sudo apt-get install python-dev build-essential
sudo apt-get install python-pip
sudo apt-get install libsqlite3-dev sqlite3
sudo apt-get install libreadline-dev libncurses5-dev
sudo apt-get install libssl1.0.0 tk8.5-dev zlib1g-dev liblzma-dev
sudo apt-get build-dep python2.7
sudo apt-get build-dep python3.3
sudo pip install virtualenv
sudo pip install virtualenvwrapper
Add the virtualenvwrapper settings to ~.bashrc:
export WORKON_HOME="$HOME/.virtualenvs"
source /usr/local/bin/virtualenvwrapper.sh
Then for Python 2.7:
sudo mkdir /opt/python2.7.5
wget http://python.org/ftp/python/2.7.5/Python-2.7.5.tgz
tar xvfz Python-2.7.5.tgz
cd Python-2.7.5/
./configure --prefix=/opt/python2.7.5
make
sudo make install
mkvirtualenv --python /opt/python2.7.5/bin/python2 v-2.7.5
Then for Python 3.3:
sudo mkdir /opt/python3.3.2
wget http://python.org/ftp/python/3.3.2/Python-3.3.2.tgz
tar xvfz Python-3.3.2.tgz
cd Python-3.3.2
./configure --prefix=/opt/python3.3.2
make
sudo make install
mkvirtualenv --python /opt/python3.3.2/bin/python3 v-3.3.2
To view the virtual environments:
lsvirtualenvTo change between them:
workon [env name] e.g. v-3.3.2
Then to install some of the major scientific and machine learning related packages:
pip install numpy
pip install ipython[all]
pip install cython
sudo apt-get build-dep python-scipy
pip install scipy
pip install matplotlib
pip install scikit-learn
pip install pandas
To stop working on a particular version:
deactivate
It's great that you share with us.
ReplyDeleteSuper option, just like I thought. Thanks for the tips!
ReplyDeleteMua vé máy bay tại Aivivu, tham khảo
ReplyDeleteVé máy bay đi Mỹ
cách mua vé máy bay giá rẻ từ mỹ về việt nam
vé máy bay từ đức về việt nam
vé máy bay từ nhật về vn
bay từ hàn quốc về việt nam
chuyến bay thương mại từ canada về việt nam
chuyen bay chuyen gia trung quoc
Thank you for sharing interesting post. I like your post. Moreover, The garage door repair Kennesaw provide best work.
ReplyDeleteWe can use the update-alternatives command to set priority to different versions of the same software installed in Ubuntu systems. From our Private Transportation Services in Vail CO, you can avail cost-effective and smooth rides.
ReplyDelete