Closed Erwyn closed 10 years ago
This is typically accomplished with virtualenv and pip.
There is a dev mode for pip? Cause I don't really know how to plug the git repository in it. Le 24 juin 2014 03:11, "matthewi" notifications@github.com a écrit :
This is typically accomplished with virtualenv and pip.
— Reply to this email directly or view it on GitHub https://github.com/charlesthomas/magpie/issues/16#issuecomment-46921594.
Here's how I have done this in the past:
brew install python
(requires Homebrew & installs a second system Python, but it works and installs pip, too)
OR
easy_install pip
apt-get install python-pip
pip install virtualenv virtualenvwrapper
export PIP_RESPECT_VIRTUALENV=true
(This should probably go in your .bashrc or .bash_profile file so it's always on)
export PIP_REQUIRE_VIRTUALENV=true
(This will cause pip to fail with a warning if you try to pip install something outside of a virtualenv -- ie in your system Python. It's optional, but recommended. If you use this, it should also go in .bashrc / .bash_profile)
either bash
or source .bashrc
or something to get a new shell, which should give you access to virtualenvwrapper commands and export the pip stuff described above.
mkvirtualenv magpie
(this is just a name for the virtualenv -- it doesn't have to be called magpie)
this will put you in the virtualenv. to get out of it, use deactivate
. to get back in workon magpie
(assuming you named it magpie in the mkvirtualenv
command.
this is completely independent from everything else. you don't have to be in the virtualenv to clone the repo and you don't have to be in the repo to use the virtualenv - they are mutually exclusive.
the virtualenv and git repo are mutually exclusive, but you'll need the repo cloned and the virtualenv active in order to install the requirements
pip install -r requirements.txt
you should now have a working magpie dev environment
Thank you! I'll try this asap.
Hello,
I'd like to setup a dev environment to work on magpie's code, but I don't know a lot of things about how to do this for Python. How to setup a dev environment so that I don't install stuff (like tornado or filemagick) system wide?
Regards,