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

From Laura Creighton <lac@openend.se>
Subject Re: Using a particular python binary with venv
References <ca4f39e1-f02a-403f-b113-82e25201a2cd@googlegroups.com>
Date 2015-06-01 23:45 +0200
Newsgroups comp.lang.python
Message-ID <mailman.20.1433195158.13271.python-list@python.org> (permalink)

Show all headers | 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