08-19-2020 07:55 AM
Hi Team,
In the Mac setup process, virtual environment python does not work and I believe the life py-2venv is missing @
https://github.com/CiscoDevNet/hello_network
on my mac after clone
ls
LICENSE hello_network hello_network.sh
README.md hello_network.py
Thanks
Ravi
Solved! Go to Solution.
08-20-2020 12:34 AM - edited 08-20-2020 12:34 AM
Hi @rkumar2
The venv is something you need to install/create on your own laptop.
If you are using python2, I would suggest to install and use python3.
However, if for whatever reason you still wanna continue with py2, the commands to use for creating the venv are:
python -m pip install py2venv python -m venv /path/to/venv source venv/bin/activate
For python3:
python3 -m pip install --user virtualenv python3 -m venv /path/to/venv source venv/bin/activate
Note: best way is to first move to the directory where your project is, and there to use python -m venv venv as this command will create the venv directory in the current project dir.
More details about venv: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment
Stay safe,
Sergiu
08-20-2020 12:34 AM - edited 08-20-2020 12:34 AM
Hi @rkumar2
The venv is something you need to install/create on your own laptop.
If you are using python2, I would suggest to install and use python3.
However, if for whatever reason you still wanna continue with py2, the commands to use for creating the venv are:
python -m pip install py2venv python -m venv /path/to/venv source venv/bin/activate
For python3:
python3 -m pip install --user virtualenv python3 -m venv /path/to/venv source venv/bin/activate
Note: best way is to first move to the directory where your project is, and there to use python -m venv venv as this command will create the venv directory in the current project dir.
More details about venv: https://packaging.python.org/guides/installing-using-pip-and-virtual-environments/#creating-a-virtual-environment
Stay safe,
Sergiu
08-20-2020 06:55 AM
@Sergiu.Daniluk , Yes, I did upgrade Python to Python3. Will install the venv on my mac. Thank you.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide