create a virtual environment using the Python venv
module:
python -m venv .env
You can jump in and out of your virtual environment with the activate
and deactivate
scripts:
# Activate the virtual environment source .env/bin/activate # Deactivate the virtual environment source .env/bin/deactivate
In windows:
.env\Scripts\activate
You can make sure that the environment is activated by running the which python
command: if it points to the virtual environment, then you have successfully activated it!
which python
/home/<user>/transformers-course/.env/bin/python
- ۰ نظر
- ۱۱ مرداد ۰۲ ، ۲۳:۳۶