I am in a venv on a ubuntu 16 vm with both python 2.7 and 3.5 installed. I am receiving an import error regarding one of the module's in my project's site-packages folder. I am attempting to run a program with python 2.7. When I run the program python nmap_receiver.py
, I receive an ImportError regarding one of the packages in my site-packages folder which is located here, /home/carsten/SecNmap/venv/lib/site-packages/
. I am not quick certain why this is happening. Also, I found it interesting that my /usr/local/lib/python2.7/site-packages and dist-packages are empty and I don't even have a site-packages folder in /usr/lib/python2.7 . From that little bit of info, can anyone guess why or lead me in a direction that may assist in getting this program running properly?
Asked
Active
Viewed 154 times
0

UCProgrammer
- 517
- 7
- 21
1 Answers
0
You are using venv with python 2.7. Venv is a package shipped with Python 3 only. For python2 use virtualenv. Or other tools: What is the difference between venv, pyvenv, pyenv, virtualenv, virtualenvwrapper, pipenv, etc?

Adelina
- 10,915
- 1
- 38
- 46
-
hmmmm so when I run 'source activate', I should see virtualenv and not venv? I'm using project that my coworker made. I can't imagine he'd miss that – UCProgrammer Jul 26 '18 at 19:13
-
Activate correct env: source python2.7_virtualEnv/bin/activate – Adelina Jul 26 '18 at 19:15