I have been trying to figure out how the command line for guided projects works. I have tried activating the virtual environment but I don’t think I have managed that. If I could get an explanation of how to move past dataquest/system/env/python3/bin
to dataquest/system/env/python3/bin/activate
. and also how to run the python file after activating the virtual environment.
Hi @babatolatemi,
Welcome to the community!
I believe your question is related to this mission:
https://app.dataquest.io/m/97/command-line-python-scripting/5/creating-a-python-3-virtualenv
You can create and activate a virtual environment by executing these commands:
virtualenv -p /usr/bin/python3 python3
source python3/bin/activate
Once you run the commands, the prompt will appear something like this:
(python3) /home/dq$
The (python3)
indicates that you are using a virtual environment. So if you execute a python file python script.py
, it will be executed by the virtual environment.
Hope this helps
Best,
Sahil
1 Like