Installing python 3 for a specific environment
<p>I have <code>python 2.7.10</code> installed on my <code>mac</code>.</p>

<p>but I happen to need <code>Python 3</code> to use a <code>python wrapper</code> for a given <code>API</code>.</p>

<p>this is my folder structure:</p>

<pre><code>apps/
    myapp/
         app.py
         gracenote/
                  pygn.py
</code></pre>

<p>where <code>pygn.py</code> is the wrapper wich requires <code>Python 3</code>, while <code>app.py</code> requires <code>Python 2.7</code></p>

<p>is there a way to run an isolated <code>Python</code> environment for the <code>wrapper</code>?</p>

<p>You'll need to install both versions of python at the same time</p>

<pre><code>$ which python3 # copy the output of this command
$ mkvirtualenv --python=/path/to/python3 ~/.virtualenvs/{your env name}
$ workon {your env name}
</code></pre>

python python-2.7 python-3.x development-environment