pyhon environment activate in windows
To activate a Python environment in Windows, follow these steps:
-
Open the command prompt by pressing Windows key + R and type cmd in the Run dialog box.
-
Once the command prompt opens, navigate to the directory where you want to create the environment.
-
Create a new environment using the following command:
python -m venv <environment-name>Replace
<environment-name>with the name you want to give to your environment. -
Once the environment is created, activate it using the following command:
<environment-name>\Scripts\activate.batReplace
<environment-name>with the name of your environment. -
You will see the name of your environment in the command prompt, indicating that you have successfully activated it.
-
You can now install packages and run Python scripts in the activated environment.
-
To deactivate the environment, simply type
deactivatein the command prompt.
原文地址: https://www.cveoy.top/t/topic/bbBX 著作权归作者所有。请勿转载和采集!