###### tags: `Virtual Environment` # 用 Window + pycharm的話 1. terminal (in the projet folder) ` python -m venv pinkco(vm name)` 2. in terminal .\pinkco\Scripts\activate.bat .\test\Scripts\activate.bat 3. go pycahrm setting -> intepreter -> add existing vm -> avilable for all projects to deavtivate just type deactivate # On linux in project directory ``` python3 -m venv virtual-environment-name python3 -m venv venv ``` source venv/bin/activate (ven is the name) ### active ``` source venv/bin/activate ``` 跑flask in command line: ``` export FLASK_APP=hello flask run ``` 乾淨venv ``` pip freeze > requirements.txt Now to remove one by one pip uninstall -r requirements.txt ```