16

I am trying to create virtual env with python2 in mac os from here. While running pip install virtualenv command in terminal I am getting following error.

Could not find a version that satisfies the requirement virtualenv (from versions: )
No matching distribution found for virtualenv
user513951
  • 11,572
  • 7
  • 61
  • 75
sshah
  • 213
  • 1
  • 4
  • 9

6 Answers6

16

If you are using python 3.x, Please try this commands

sudo pip3 install --upgrade pip

sudo pip3 install virtualenv

Community
  • 1
  • 1
Bharath KM
  • 195
  • 1
  • 6
14

Run this command and try again

curl https://bootstrap.pypa.io/get-pip.py | python

The detailed description can be found in the link shared by Anupam in the comments.

shammerw0w
  • 1,861
  • 1
  • 13
  • 10
  • 1
    the above commands for my windows 10 and python 3.6.5 gave error `The target principal name is incorrect.` how did get this one working. – Nitish Kumar Pal Jul 03 '18 at 11:08
  • 5
    I had todo `curl https://bootstrap.pypa.io/get-pip.py | sudo python` for it to work on my machine (note the `sudo` before the `python`) – James111 Aug 02 '18 at 05:05
  • Thanks. Doing this solves my problem. One thing I noticed before/after was that pip seems to talk to "pypi.python.org" before and "pypi.org" after. Seems like some new packages are maintained in a new repo perhaps ???... In particular, I was trying to install scikit-learn. – tuan.dinh Nov 30 '18 at 05:14
10

Please try below commands

pip install --upgrade virtualenv
Kamal
  • 149
  • 1
  • 4
1

We tried the above but they didn't work in our case because we had two versions of python3 on the systems. One via a normal install a few months back and one via brew (on a Mac). When we discovered that, we downloaded and installed the latest version from python.org and as a result the pip was updated too. Once the pip was installed the sudo pip3 install virturaenv command worked fine.

Anthony Petrillo
  • 167
  • 2
  • 11
-1

pip install --upgrade virtualenv

This solution works for me in Centos8

  • This solution has already been posted, see [Kamal's answer](https://stackoverflow.com/a/55620248/2227743). – Eric Aya Jan 26 '21 at 09:49
-5

If you are using Windows, you have to run cmd as admin.

double-beep
  • 4,567
  • 13
  • 30
  • 40
sk3k
  • 1
  • 2
    This is not an answer to the question. It should be a comment on the related answer instead. – walnut Sep 07 '19 at 10:44