Reputation: 57
My website is hosted in a PAAS provider,
made a virtual environment using below command
$ mkvirtualenv --python=/usr/bin/python3.8 mysite-virtualenv
However I can not activate it, please refer the attached image for file structure.
Upvotes: 3
Views: 38768
Reputation: 700
To activate the virtual environment in the terminal enter the following command:-
For Linux,
source envName/bin/activate
For windows,
envName/scripts/activate
Upvotes: 0
Reputation: 676
Your virtual environment was created with virtualenvwrapper. Activate it with command workon mysite-virtualenv
in bash console on PythonAnywhere.
For the web app you need to set it on the "Web" configuration page.
Upvotes: 2
Reputation: 1290
As indicated in official Python's documentation, You can create the environment with:
python3 -m venv NAMENEV
and activate with:
NAMENEV\Scripts\activate.bat # ON WINDOWS
source NAMENEV/bin/activate # ON LINUX/MAC
Upvotes: 6