I'm starting development with virtualenv and some doubts have arisen, they are:
I'm starting development with virtualenv and some doubts have arisen, they are:
The answer to the first question is: No! and does not seem to make sense, what I see (and do not use) is the opposite, the venv be in a directory within your project.
Yes, in pycharm you have to say with which venv your project will work, set it to File / settings / project interpreter.
Theanswertothethirdquestionis:Notnecessarily!Theconceptofvirtualsendstothedeveloper,sothathecanhaveseveraldevelopmentenvironmentsonhisworkstation,inthiswayonecandevelopeprojectsinpython2,python3,etc.,simplyby"switching" the environments.
In the machine that will run the project must have all the packages required by the same, whether or not in a virtual env. To do this use a requirements file, commonly called requirements.txt
To start managing virtual environments in python, consider using anaconda. See, here in STOpt, this answer , and open that door with a golden key. : -)