Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #91722

Re: Using a particular python binary with venv

Path csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed4.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <lac@openend.se>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; '#if': 0.05; 'binary': 0.05; 'skip:/ 10': 0.07; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'cc:addr:python-list': 0.10; 'python': 0.11; 'python.': 0.11; '2.7': 0.13; 'subject:python': 0.14; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'deactivate': 0.16; 'es:': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:89.233': 0.16; 'received:89.233.217': 0.16; 'received:89.233.217.133': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'laura': 0.18; 'cc:addr:python.org': 0.21; 'cc:2**1': 0.22; 'environments': 0.22; '2015': 0.23; 'module': 0.23; "haven't": 0.24; 'header:In- Reply-To:1': 0.24; 'mon,': 0.24; 'install': 0.25; '-0700,': 0.29; 'received:se': 0.29; 'environment': 0.29; 'cc:no real name:2**1': 0.29; 'source': 0.31; 'url:mailman': 0.31; 'url:python': 0.33; 'url:listinfo': 0.35; 'done': 0.35; 'url:org': 0.36; 'url:library': 0.36; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'creation': 0.38; 'virtual': 0.38; 'url:docs': 0.39; 'subject:with': 0.40; 'url:3': 0.60; 'your': 0.60; 'back': 0.61; 'header:Message-Id:1': 0.62; 'email addr:gmail.com': 0.64; 'url:4': 0.70; 'received:89': 0.80; 'pip': 0.84; 'subject:Using': 0.84
To greenbay.graham@gmail.com
cc python-list@python.org, lac@openend.se
From Laura Creighton <lac@openend.se>
Subject Re: Using a particular python binary with venv
In-Reply-To Message from greenbay.graham@gmail.com of "Mon, 01 Jun 2015 14:33:56 -0700." <ca4f39e1-f02a-403f-b113-82e25201a2cd@googlegroups.com>
References <ca4f39e1-f02a-403f-b113-82e25201a2cd@googlegroups.com>
MIME-Version 1.0
Content-Type text/plain; charset="us-ascii"
Content-ID <5542.1433195139.1@fido>
Content-Transfer-Encoding quoted-printable
Date Mon, 01 Jun 2015 23:45:39 +0200
X-Greylist Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Mon, 01 Jun 2015 23:45:42 +0200 (CEST)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.20.1433195158.13271.python-list@python.org> (permalink)
Lines 32
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1433195158 news.xs4all.nl 2833 [2001:888:2000:d::a6]:40358
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:91722

Show key headers only | View raw


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

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

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

csiph-web