0

When I do this:

pythonbrew venv create proj
pythonbrew venv list
pythonbrew venv use proj

a new virtual environment is installed to my ~/.pythonbrew/venvs/Python-2.7.3 directory, where it puts all my other virtual environments as well. Is there a way to specify a different target location (or move it to where I want after installing) without breaking things? I want to keep my virtual environments with their associated projects, not all together under the .pythonbrew directory. I know I can do this easily enough with plain old virtualenv, but I need pythonbrew to use the brewed version of python we want.

I'm not seeing how to do this in the documentation, and copying my virtual environment to my project directory and symlinking from it didn't work as well as I'd hoped. I'm aware of pyenv, and plan to go that route at some point, but am still using pythonbrew for the moment.

Is there a way to do this that I missed?

Ennael
  • 861
  • 3
  • 14
  • 31
  • There should be a path in 1 of the files that specifies where the venv is being installed. You'll also need to be careful not to break other dependencies that might be direct-linking to that specific path. – Joe May 02 '14 at 01:08
  • Hmm.. I found the general path in the conf file, I think, but will need to do some experimenting to see if changing that temporarily will work. If not, maybe I can figure out how pythonbrew calls the embedded virtualenv, so I can do it similarly (so it knows which python to embed). Thanks for the tip, @Joe! – Ennael May 02 '14 at 19:36
  • I believe it should work similar to any other venv. What you can do (and what I haven't done) is to analyze what is inside that venv. It might be that the venv contains all the python stuff (libs, etc.) and isn't dependent on the python version it was installed with. Good luck. – Joe May 04 '14 at 00:11

0 Answers0