0

I've been trying to use virtualenv for python but whenever I try to run the virtualenv venv command, I receive this error:

Using base prefix '/Users/me/anaconda'
New python executable in /Users/me/venv/bin/python
dyld: Library not loaded: @rpath/libpython3.5m.dylib
  Referenced from: /Users/me/venv/bin/python
  Reason: image not found
ERROR: The executable /Users/me/venv/bin/python is not functioning
ERROR: It thinks sys.prefix is '/Users/me' (should be '/Users/me/venv')
ERROR: virtualenv is not compatible with this system or executable

Before this I made sure I did

pip install virtualenv

And that was fine. Not sure how to solve this error. Also 'me' is my username

Update: I was able to fix this issue. The other post that others told me to look at didn't help. I had to reinstall anaconda to fix the issue.

user2914144
  • 127
  • 1
  • 3
  • 11
  • Possible duplicate of [Broken references in Virtualenvs](http://stackoverflow.com/questions/23233252/broken-references-in-virtualenvs) – holdenweb Jan 19 '17 at 17:11

2 Answers2

0

I'm guessing you're a Mac user like me. This error typically occurs when you have updated the Python that you used to create the virtualenv. This answer tells you what you need to know, so I'm voting to close this question as a duplicate (because I didn't search for existing answers before I started this reply!)

Community
  • 1
  • 1
holdenweb
  • 33,305
  • 7
  • 57
  • 77
0

I was able to fix this by reinstalling anaconda

user2914144
  • 127
  • 1
  • 3
  • 11