python development environment on a mac

macports at parvis.nl macports at parvis.nl
Mon Mar 13 13:28:02 UTC 2017


my son needs for his music studies a python development environment 2.7.13 plus the actual 3.x.
his imac is on osx 10.11 el capitan.

so i installed from macports python 27 and 33, ipython, selects:

 python27 @2.7.13_0+readline (active)
 python36 @3.6.0_0 (active)
 python2_select @0.0_2 (active)
 python3_select @0.0_1 (active)
 python_select @0.3_7 (active)

 py27-ipython @5.3.0_0 (active)
 py36-ipython @5.3.0_0 (active)
 ipython2_select @0.1_0 (active)
 ipython3_select @0.1_0 (active)
 ipython_select @0.4_0 (active)

 py27-future @0.15.2_0 (active)
 py36-future @0.15.2_0 (active)

 py27-six @1.10.0_0 (active)
 py36-six @1.10.0_0 (active)

 py27-pip @9.0.1_0 (active)
 py36-pip @9.0.1_0 (active)
 pip_select @0.1_0 (active)

 py27-virtualenv @15.1.0_0 (active)
 py27-virtualenv-clone @0.2.6_0 (active)
 py27-virtualenvwrapper @4.7.1_0 (active)
 py36-virtualenv @15.1.0_0 (active)
 py36-virtualenv-clone @0.2.6_0 (active)
 py36-virtualenvwrapper @4.7.1_0 (active)
 virtualenv_select @0.1_0 (active)

port select --summary
Name        Selected      Options
====        ========      =======
ipython     py27-ipython  py27-ipython py36-ipython none
ipython2    py27-ipython  py27-ipython none
ipython3    py36-ipython  py36-ipython none
pip         pip27         pip27 pip36 none
python      python27      python26-apple python27 python27-apple python36 none
python2     python27      python26-apple python27 python27-apple none
python3     python36      python36 none
virtualenv  virtualenv27  virtualenv27 virtualenv36 none

$ which virtualenv
/opt/local/bin/virtualenv
$ virtualenv $HOME/PyEnv/python/27
New python executable in /Users/paul/PyEnv/python/27/bin/python
Installing setuptools, pip, wheel...done.
$ virtualenv $HOME/PyEnv/python/36
New python executable in /Users/paul/PyEnv/python/36/bin/python
Installing setuptools, pip, wheel...done.

$ . $HOME/PyEnv/python/27/bin/activate
$ python --version
Python 2.7.13
$ ipython --version
5.3.0
$ pip --version
pip 9.0.1 from /Users/me/PyEnv/python/27/lib/python2.7/site-packages (python 2.7)

$ ipython
/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/IPython/core/interactiveshell.py:724: UserWarning: Attempting to work in a virtualenv. If you encounter problems, please install IPython inside the virtualenv.
 warn("Attempting to work in a virtualenv. If you encounter problems, please "

questions:
- should i install ipython in this virtualenv
- if so, how (macports or not)?

$ ls /$HOME/me/PyEnv/python/*/bin
/$HOME/me/PyEnv/python/27/bin:
activate		activate_this.py	pip			python			python2.7
activate.csh		easy_install		pip2			python-config		wheel
activate.fish		easy_install-2.7	pip2.7			python2
/$HOME/me/PyEnv/python/36/bin:
activate		activate_this.py	pip			python			python2.7
activate.csh		easy_install		pip2			python-config		wheel
activate.fish		easy_install-2.7	pip2.7			python2

questions:
- does virtuelenv36 uses 2.7 dus to port --select?
- if so, how should i have done it?

the big question: please explain to me the relation between macports python/ipython/pip/virtualenv and how i should use it? when & how macports, when & how not, why???








More information about the macports-users mailing list