Virtualenv setup
timea-techgirl opened this issue · 15 comments
These two commands don't work, is it ok?
virtualenv venv --python=python3.6
source venv/bin/activate
@timeakesmarky you need to have some version of Python3 installed on your system to be able to do this.
Can you tell the output of following command on your machine?
python3 --version
I have python 3.7 installed but
this command says python3 is not recognized as an internal or external....
But,
python --version
says python 3.7.4
virtualenv venv --python=python3.7
source venv/bin/activate
This should work for you
Nope, I already tried that, same error.
The path python3.7 (from --python=python3.7) does not exist
But wareader works even without executing these two commands. So, why do we need these 2 commands?
It is considered to be a good practice to have your Python packages seperated on the basis of your project i.e., each project should have its own dependencies. Here's a good answer explaining the need for virtual environmentns: https://qr.ae/TWKrc1
Can you send me the exact output for python --version
command and which python
command?
I use windows:
python --version
Python 3.7.4
which python is an unknown internal or external....
I think for Windows the command is where python
C:\Users\Timea\AppData\Local\Programs\Python\Python37-32\python.exe
virtualenv venv -p C:\Users\Timea\AppData\Local\Programs\Python\Python37-32\python.exe
source venv/bin/activate
This works. It also works with,
virtualenv venv --python=python
What if I want a different python version?
source venv/bin/activate
doesn't work.
What if I want a different python version?
You would need to install a different version of Python and provide that path in virtualenv venv -p <new_path>
source venv/bin/activate
doesn't work.
Can you try .\venv\Scripts\activate
Oh ok. But why does THIS app need the virtualenv setup?
Activation works now.
This app in particular doesn't need virtual environment. It is considered a good practice to do it anyways.
Closing the issue since the issue seems to be resolved.