开发者

django virtualenv

开发者 https://www.devze.com 2023-03-07 10:19 出处:网络
I have a few questions regarding virtualenv in general. I have found some documentation online about virtualenv, although I don\'t think my setup is installing something correctly.

I have a few questions regarding virtualenv in general.

I have found some documentation online about virtualenv, although I don't think my setup is installing something correctly.

Basically I am looking at seperating my applications into their own directories and I want to start upgrading django 开发者_开发问答and certain other features for deployment to the servers.

So I have gone and installed virtualenv

pip install virtualenv

setup my new virtualenv

mkdir virt_env
vitualenv virt_env/virt1 --no-site-packages

according to this --no-site-packages your installation should only have the basics in it.

I have activated my virtualenv

source virt_env/virt1/bin/activate

and then ran yolk -l to see what packages are installed. the result seems to be a lot more than just the basics as all my previous addons are still listed.

I have even tried to deactivate, change directory into the environment called virt1, reactive and then run yolk -l again.

Still it lists all my packages.

Is this normal, or am I doing something wrong?


Are you using a yolk installed in your virtualenv or the global yolk installation?

flaper87@BigMac:/tmp$ virtualenv test3 --no-site-packages
New python executable in test3/bin/python
Installing setuptools............done.
Installing pip...............done.
flaper87@BigMac:/tmp$ source test3/bin/activate
(test3)flaper87@BigMac:/tmp$ pip install yolk
Downloading/unpacking yolk
  Downloading yolk-0.4.1.tar.gz (80Kb): 80Kb downloaded
  Running setup.py egg_info for package yolk
Requirement already satisfied (use --upgrade to upgrade): setuptools in ./test3/lib/python2.6/site-packages/setuptools-0.6c11-py2.6.egg (from yolk)
Installing collected packages: yolk
  Running setup.py install for yolk
    Installing yolk script to /private/tmp/test3/bin
Successfully installed yolk
Cleaning up...
(test3)flaper87@BigMac:/tmp$ yolk -l
Python          - 2.6.1        - active development (/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload)
pip             - 1.0.1        - active 
setuptools      - 0.6c11       - active 
wsgiref         - 0.1.2        - active development (/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6)
yolk            - 0.4.1        - active 
(test3)flaper87@BigMac:/tmp

I really suggest you to take a look at virtualenvwrapper[0] which is a set of extensions that help you on managing your virtualenvs.

Cheers!

[0] http://www.doughellmann.com/projects/virtualenvwrapper/

0

精彩评论

暂无评论...
验证码 换一张
取 消