How to

8 views
Skip to first unread message

Sanjay M

unread,
May 15, 2012, 12:01:25 PM5/15/12
to django...@googlegroups.com
I want to create a virtualenv pip, but I don't know how to Install virtualenv by running pip install virtualenv? Can anyone explain how to setup a virtualenv? 

Thanks in advance,

-Regards,
Sanjay M

马博文

unread,
May 15, 2012, 12:35:49 PM5/15/12
to django...@googlegroups.com
  1. install python if you don't have one;
  2. download easy_install, and install it;
  3. install pip through easy_install;
  4. install virtualenv through pip, by using "pip install virtualenv; pip install virtualenvwrapper "
  5. mkdir ~/.virtualenv ,in .bash_profile “export WORKON_HOME=$HOME/.virtualenv”
  6. source /Library/Frameworks/Python.framework/Versions/2.7/bin/virtualenvwrapper.sh
  7. source ~/.bash_profile

After that, i think virtualenv is doable.

regards,

Bowen


2012/5/16 Sanjay M <isan...@gmail.com>
I want to create a virtualenv pip, but I don't know how to Install virtualenv by running pip install virtualenv? Can anyone explain how to setup a virtualenv? 

Thanks in advance

-Regards,
Sanjay M

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/ImAJ5q4jrw4J.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Bill Freeman

unread,
May 15, 2012, 2:19:15 PM5/15/12
to django...@googlegroups.com
Which platform?

I mostly do Linux. If you don't then the instructions for distribute
and pip on pypi may need modification (e.g.; if you don't have curl).

Assuming the python you wish to use is already installed, and the old
easy_install isn't, you need distribute in order to install pip, see:

http://pypi.python.org/pypi/distribute

Scroll to "Installation Instructions". Note that if you don't have
curl, you can use the provided "distribute_setup.py" link to download
it with your browser. Unless you are installing in a private, rather
than system wide, python, the running of distribute_setup.py must be
done with administrator priveleges, e.g., on *nix:

sudo python distribute_setup.py

You may, if you want to install for a specific python that isn't your
default, want to replace "python" in the line above with the full path
to the specific python you want to use.

Similarly, on:

http://pypi.python.org/pypi/pip

search in the page for "get-pip.py", and do the same dance, using
something like sudo where needed.

At this point (and possibly requiring something like sudo) you can do:

pip install virtualenv

Actually makeing a virtualenv once you have the tool is a separate
question, which you did not ask.

Bill
Reply all
Reply to author
Forward
0 new messages