python development environment on a mac

Eric A. Borisch eborisch at macports.org
Tue Mar 14 18:50:43 UTC 2017


You might also look at pyNN-spyder-devel (NN=27, 33, etc) -- it can be very
nice for someone getting started.

(I intend to update the -spyder port to match what is currently
-spyder-devel, but haven't for lack of time...)

 - Eric

On Tue, Mar 14, 2017 at 11:54 AM, Joshua Root <jmr at macports.org> wrote:

> $ 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.
>>
>
> I notice you ran 'virtualenv' here both times, which is linked to
> virtualenv27.
>
> $ 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
>>
>
> So this is not surprising given the above. If you want a python 3.6
> virtualenv, use virtualenv36 (or whatever the 3.6 version is called).
>
> 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???
>>
>
> Well, IPython is a python module that provides an enhanced interactive
> shell for python. Pip is the official python module installer. Virtualenv
> is a system for making isolated python environments.
>
> MacPorts manages most of the things that pip does itself, so you normally
> shouldn't use pip to install modules into the macports prefix. It's fine to
> use it to install into a separate location (e.g. in your home directory) or
> into a virtualenv.
>
> Use a virtualenv when you want a python environment containing a specific
> set of modules for a certain task. The documentation has more info: <
> https://virtualenv.pypa.io/en/stable/>
>
> - Josh
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-users/attachments/20170314/85ada678/attachment.html>


More information about the macports-users mailing list