Python, virtualenv - Is it possible to use a single Pyramid project with multiple virtualenvs on different computers?
I'm really interested in trying out the Pyramid Framework but only half 开发者_如何学Pythonof my programming time is spent on my computer here at home; I spend a considerable amount of time at school and use their computers as well, and according to the documentation for virtualenv, environments can't be moved around like projects. What I'm thinking of doing is installing a different virtualenv for Pyramid projects on the computers I use at school in addition to one at home. Would I be able to do this?
In your setup.py
file at the root of your project, you just have to list all the dependencies you have in requires
.
Then, with your virtualenv activated, you run
python setup.py develop
This will install missing dependencies on your current virtualenv.
Example:
requires = ['pyramid',
'WebError',
'pymongo',
'mock',
'formencode']
- Use something like Dropbox to keep your source file in sync between machines.
- Use pip in with virtualenv, keep a requirements.txt file that lists all the dependencies for your software.
this isn't really specific to pyramid. you need to look into version control. get a free account on github or bitbucket and push/pull your code from there.
精彩评论