VENV folder & Virtual evn creating questions - PLEASE HELP

Hi folks,

I am having some problems here and getting very frustrated :(. So here is my scenario. I install python3.7, and I install a fresh copy of Pycharm. I start pycharm and create a new python project. NOTE: I do NOT set an interpreter in settings. 

SCENARIO 1

In this screen shot https://imgur.com/a/0PhRfZn . in the new project creation screen i user virutalenv and it puts the location of my virtual env in the following directory (MAC OS X) /Users/Rocky/PycharmProjects/TEST3/venv. NOTE: I DO NOT check "inherit global site-packages". 

as you can see i have a venv folder in the /venv/bin i have python and pip3 excutables. In /venv/lib/python3.7/site-packages i have pip there. 

I do not understand what the "external library" tree is for.

 

SCENARIO 2

in this screenshot https://imgur.com/a/3lbAREc  I followed the same steps as above EXCEPT i did select "inherit global site-packages". Now as you can see there are alot less items under /venv/bin and nothing under /venv/lib/python3.7/site-packages. Under the "external libraries" tree, the "site-packages" folder has a little up arrow next to it, and it points to where my python interpreter is installed (/usr/local/Cellar/python/3.7.0/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages). I know this because I see alot of packages . 

1. why is the /venv/lib/python3.7/site-packages empty?

2. why do we even have a venv folder?

3. why do i have less executables under /venv/bin?

 

Scenario 3

if now I go to pycharm settings (right when i open pycharm with all projects closed), and I assign an over all interpreter, AKA FOR DEFAULT PROJECT, it will want to put it under /Users/Rocky/venv , and when i create a new project, my projects VENV is under the /Users/Rocky/venv directory /Users/Rocky/venv/TEST4 rather than being under  /Users/Rocky/PycharmProjects/TEST4/venv. NOW THERE IS NO VENV folder under my projecthttps://imgur.com/a/M1lZu3Q . 

1. what is going on? why is that VENV folder gone now?

2. why are there two "site-packages" directories? one with little arrow with stuff under it, and the other is empty.

 

 

please help this has really confused me. In scenario 1 and two the venv is in the project directory, and i see it in the project view. In the last scenario its no where to be seen in pycharm project view. Do i need to have that? which way is best practice

0

Please sign in to leave a comment.