cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1519
Views
0
Helpful
2
Replies

py2-venv not found

rkumar2
Cisco Employee
Cisco Employee

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

1 Accepted Solution

Accepted Solutions

Sergiu.Daniluk
VIP Alumni
VIP Alumni

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

 

View solution in original post

2 Replies 2

Sergiu.Daniluk
VIP Alumni
VIP Alumni

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

 

@Sergiu.Daniluk , Yes, I did upgrade Python to Python3. Will install the venv on my mac. Thank you.