Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #91718 > unrolled thread
| Started by | greenbay.graham@gmail.com |
|---|---|
| First post | 2015-06-01 14:33 -0700 |
| Last post | 2015-06-01 23:45 +0200 |
| Articles | 7 — 4 participants |
Back to article view | Back to comp.lang.python
Using a particular python binary with venv greenbay.graham@gmail.com - 2015-06-01 14:33 -0700
Re: Using a particular python binary with venv Ian Kelly <ian.g.kelly@gmail.com> - 2015-06-01 15:38 -0600
Re: Using a particular python binary with venv Carl Meyer <carl@oddbird.net> - 2015-06-01 15:42 -0600
Re: Using a particular python binary with venv greenbay.graham@gmail.com - 2015-06-01 15:07 -0700
Re: Using a particular python binary with venv Carl Meyer <carl@oddbird.net> - 2015-06-01 16:19 -0600
Re: Using a particular python binary with venv greenbay.graham@gmail.com - 2015-06-01 15:23 -0700
Re: Using a particular python binary with venv Laura Creighton <lac@openend.se> - 2015-06-01 23:45 +0200
| From | greenbay.graham@gmail.com |
|---|---|
| Date | 2015-06-01 14:33 -0700 |
| Subject | Using a particular python binary with venv |
| Message-ID | <ca4f39e1-f02a-403f-b113-82e25201a2cd@googlegroups.com> |
According to this https://docs.python.org/3.4/library/venv.html#module-venv 'Each virtual environment has its own Python binary (allowing creation of environments with various Python versions)' So how would I create a virtual environment using the venv module that has a Python 2.7 binary? tia g
[toc] | [next] | [standalone]
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2015-06-01 15:38 -0600 |
| Message-ID | <mailman.18.1433194780.13271.python-list@python.org> |
| In reply to | #91718 |
On Mon, Jun 1, 2015 at 3:33 PM, <greenbay.graham@gmail.com> wrote: > According to this https://docs.python.org/3.4/library/venv.html#module-venv 'Each virtual environment has its own Python binary (allowing creation of environments with various Python versions)' > So how would I create a virtual environment using the venv module that has a Python 2.7 binary? I wouldn't recommend trying to create a venv virtual environment using Python 2.7, because venv was only added to the standard library in Python 3.3. Use the third-party virtualenv instead.
[toc] | [prev] | [next] | [standalone]
| From | Carl Meyer <carl@oddbird.net> |
|---|---|
| Date | 2015-06-01 15:42 -0600 |
| Message-ID | <mailman.19.1433194962.13271.python-list@python.org> |
| In reply to | #91718 |
[Multipart message — attachments visible in raw view] — view raw
On 06/01/2015 03:33 PM, greenbay.graham@gmail.com wrote: > According to this > https://docs.python.org/3.4/library/venv.html#module-venv 'Each > virtual environment has its own Python binary (allowing creation of > environments with various Python versions)' > > So how would I create a virtual environment using the venv module > that has a Python 2.7 binary? You can't. The venv module only exists in and supports Python 3.3+. If you need to support earlier Django versions, you'll need to use the older "virtualenv" library instead, which looks very similar from the end-user side. See https://virtualenv.pypa.io/en/latest/ Carl
[toc] | [prev] | [next] | [standalone]
| From | greenbay.graham@gmail.com |
|---|---|
| Date | 2015-06-01 15:07 -0700 |
| Message-ID | <fc1b77f4-cb0e-4f03-b383-00bbd15c1a02@googlegroups.com> |
| In reply to | #91720 |
On Tuesday, 2 June 2015 09:43:37 UTC+12, Carl Meyer wrote: > On 06/01/2015 03:33 PM, orotau wrote: > > According to this > > https://docs.python.org/3.4/library/venv.html#module-venv 'Each > > virtual environment has its own Python binary (allowing creation of > > environments with various Python versions)' > > > > So how would I create a virtual environment using the venv module > > that has a Python 2.7 binary? > > You can't. The venv module only exists in and supports Python 3.3+. > > If you need to support earlier Django versions, you'll need to use the > older "virtualenv" library instead, which looks very similar from the > end-user side. See https://virtualenv.pypa.io/en/latest/ > > Carl Thanks Carl I am guessing that the documentation needs to be altered then. I will submit a documentation bug... cheers g
[toc] | [prev] | [next] | [standalone]
| From | Carl Meyer <carl@oddbird.net> |
|---|---|
| Date | 2015-06-01 16:19 -0600 |
| Message-ID | <mailman.22.1433197165.13271.python-list@python.org> |
| In reply to | #91725 |
[Multipart message — attachments visible in raw view] — view raw
On 06/01/2015 04:07 PM, greenbay.graham@gmail.com wrote: > On Tuesday, 2 June 2015 09:43:37 UTC+12, Carl Meyer wrote: >> On 06/01/2015 03:33 PM, orotau wrote: >>> According to this >>> https://docs.python.org/3.4/library/venv.html#module-venv 'Each >>> virtual environment has its own Python binary (allowing creation of >>> environments with various Python versions)' >>> >>> So how would I create a virtual environment using the venv module >>> that has a Python 2.7 binary? >> >> You can't. The venv module only exists in and supports Python 3.3+. >> >> If you need to support earlier Django versions, you'll need to use the >> older "virtualenv" library instead, which looks very similar from the >> end-user side. See https://virtualenv.pypa.io/en/latest/ > > Thanks Carl > I am guessing that the documentation needs to be altered then. I will submit a documentation bug... I think the documentation is accurate as written (you _can_ create environments with various Python versions, they just have to be versions that include and support the venv module), but a clarification on the supported Python versions in that sentence seems reasonable to me. Carl
[toc] | [prev] | [next] | [standalone]
| From | greenbay.graham@gmail.com |
|---|---|
| Date | 2015-06-01 15:23 -0700 |
| Message-ID | <34390cbb-bc88-4cf7-a6f8-1ed13d818912@googlegroups.com> |
| In reply to | #91725 |
http://bugs.python.org/issue24356
[toc] | [prev] | [next] | [standalone]
| From | Laura Creighton <lac@openend.se> |
|---|---|
| Date | 2015-06-01 23:45 +0200 |
| Message-ID | <mailman.20.1433195158.13271.python-list@python.org> |
| In reply to | #91718 |
In a message of Mon, 01 Jun 2015 14:33:56 -0700, greenbay.graham@gmail.com writ es: >According to this https://docs.python.org/3.4/library/venv.html#module-venv 'Each virtual environment has its own Python binary (allowing creation of environments with various Python versions)' >So how would I create a virtual environment using the venv module that has a Python 2.7 binary? >tia >g >-- >https://mail.python.org/mailman/listinfo/python-list #If you haven't already got it pip install virtualenv #Then cd where_I_want_to_work virtualenv -p /usr/bin/python2.7 venv source venv/bin/activate pip install packages_i_need # when you are done deactivate to get back to your system python. Laura
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web