Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Strange "local" folder inside virtualenv folder

Tags:

After I create my virtualenv environment (VE), inside it there is a symbolic link named "local". It points to the VE folder, which means that if you open it you end up in the same folder that you started in.

I wouldn't care about that, but it makes some autocompletion "wizards" in PyCharm unusable (they show the same item over and over again, each time with a deeper nesting level).

Somehow I cannot find any hint about this problem (I'm using virtualenv 1.6.4).

The question is: what's that "local" symlink used for ?

like image 418
Tomasz Zieliński Avatar asked Nov 22 '11 12:11

Tomasz Zieliński


People also ask

How do I get rid of VENV folder?

There is no command for deleting your virtual environment. Simply deactivate it and rid your application of its artifacts by recursively removing it. Note that this is the same regardless of what kind of virtual environment you are using.

What is the include folder in VENV?

The bin folder has scripts for interacting with the virtual environment and a copy of the python and pip interpreter among other libraries. The include folder contains support libraries if needed. The lib directory is where all of the python libraries installed on that virtual environment are.

What is VENV folder in Pycharm?

venv – or “virtual environments” – is a Python module that's used to create a lightweight and isolated environment for running Python projects. It's used to keep the dependencies required by different projects isolated from one another.


1 Answers

According to the source the local symlink was put in place as a fix for a bug that affected platforms using the "posix_local" install scheme. This change was introduced in version 1.6.3.

The problem you described has been addressed by this pull request on github. This proposed patch changes the symlinks to point to an actual local directory rather than the parent directory. It is yet to be merged. This patch has since been applied so the problem should be fixed in the next release (1.7.1 perhaps?).

like image 79
Shawn Chin Avatar answered Sep 18 '22 13:09

Shawn Chin