0
$  virtualenv --versionTraceback (most recent call last):
  File "/home/rohit/bin/virtualenv", line 5, in <module>
    from pkg_resources import load_entry_point
  File "/home/rohit/.local/lib/python2.7/site-packages/pkg_resources.py", line 3011, in <module>

  File "/home/rohit/.local/lib/python2.7/site-packages/pkg_resources.py", line 626, in resolve

pkg_resources.DistributionNotFound: virtualenv==1.9.1
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
user1900238
  • 119
  • 3
  • 11

1 Answers1

0

I found the solution on a Google group.

It seems that /usr/local/bin/virtualenv was not updated so when you open it, you see a reference to the old virtualenv 1.9.1 when a newer version has been installed on your system.

So, you just need to open /usr/local/bin/virtualenv and replace it with:

#!/usr/local/bin/python
# -*- coding: utf-8 -*-
import re
import sys
from virtualenv import main

if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

And that worked for me!

Source: https://groups.google.com/forum/#!topic/python-virtualenv/hL_QDPJsnuY

Antoine Brunel
  • 1,065
  • 2
  • 14
  • 30