Where do I put my python files in the venv folder?
I guess you misunderstood the term "Virtual Environment". It provides an isolated environment wherein you can download a different version of python packages and run it for your project. Hence, do not put anything inside your virtual environment. Keep it clean.
To take advantage of the virtual environment,
- activate it (source path_to_virtual_env/bin/activate )
- install the necessary python packages using pip (pip install XYZ)
- and run your python code using python command (python3 mycode.py)
The virtual environment manages files which aren't yours. It doesn't care how you manage your own files. Put them wherever makes sense to you, just not anywhere inside the venv directory tree. Common solutions include directly in myproject
, or in myproject/src
.