Virtualenvwrapper: how to update the project path?

When I move the project folders, I need to manually update the project path in the .project file to make the working team work. Is automatic path updating possible?

+4
source share
2 answers

According to the docs you can use setvirtualenvproject. This will automatically move you to the project folder if you use the command workon:

bono~$: setvirtualenvproject ~/.virtualenvs/your-virtual-env/ ~/path/to/your/project

Or, as mentioned in beruic, it’s easier to activate the environment and first go to the desired working directory. Please note that this does not always work on my system, but it is much easier if it works for you:

$ workon your-virtual-env
$ cd ~/path/to/your/project
$ setvirtualenvproject

virtualenv . -a.

-a .

:

bono~$: cd ~/your/project
bono~$: mkvirtualenv my-project -a $(pwd)

, workon, .

Alternative

</" > virtualenvwrapper, . , , , , , , .

+8

, , , setvirtualenvproject:

$ workon [your_project]
$ cd [desired_project_folder]
$ setvirtualenvproject

​​ virtualenv.

+4

Source: https://habr.com/ru/post/1648837/


All Articles