I am migrating from python2 to python3.
I created a virtualenv with python3 -m venv py3 and am trying to pip install -r requirements.txt but it says
Collecting mock==1.0.1 (from -r requirements.txt (line 8))
  Using cached mock-1.0.1.tar.gz
  setuptools must be installed to install from a source distribution
I checked my virtualenv and it does have setuptools:
(py3) 1111:d3 1111$ ls py3/lib/python3.4/site-packages/
__pycache__         easy_install.py         pip-6.0.8.dist-info     setuptools
_markerlib          pip             pkg_resources           setuptools-12.0.5.dist-info
but when I still try to reinstall setuptools it says
(py3) 1111:d3 1111$ pip install setuptools
Requirement already satisfied (use --upgrade to upgrade): setuptools in 
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
So I have 2 questions:
Thanks!
This is not an answer to your questions, but for me it was easier to reinstall the virtual environment than trying to solve the issue. After setting up a new virtualenv, I had no problem installing or updating packages again.
In my case it helped to install setuptools under pip user:
pip install -U pip setuptools
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With