I can't install and configure virtual environment on python3 on my macbook pro. I was trying to install and try django for my next project but here problems started arising.
Install virtual environment in directory
In the main directory root add the following command to create the environment:
$ python3 -m venv venv
this code will create a folder called venv in the root. Which basically is the virtual environment folder.
Then add the following command to activate the virtual environment:
$ source venv/bin/activate
your_project_folder/
|
|-- your_main_app_folder/
| |
| |--Folder_with_controllers/
| | settings.py
| | urls.py
| | ...
| |
| |--App_folder/
| |--Other_app_folder/
|
|--venv/
If the code works fine your bash should look like this:
(venv) <the_path_for_the_folder> your_project_folder %
After activated your environment you can now install django and other packages.
p.s.: make sure you instal and activate the virtual environment folder not in the your_main_app_folder.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With