Where do I put my python files in the venv folder?

后端 未结 2 556
温柔的废话
温柔的废话 2020-12-30 20:36

(Probably a noob question, but I didn\'t find a solution after googling for 20 minutes.)

I created a new pure Python project with PyCharm which yie

2条回答
  •  攒了一身酷
    2020-12-30 20:52

    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)

提交回复
热议问题