jordan
jordan

Reputation: 10812

Virtualenv not working after Python upgrade. What to do?

I built a small app in python and everything was running smoothly. Afterwards, I decided to upgrade python to 2.7.5 with homebrew. When I went back to start a new project, I was no longer able to create the virtual environment. This is the ERROR I'm getting:

virtualenv --no-site-packages club_envNew python executable in club_env/bin/python
ERROR: The executable club_env/bin/python is not functioning
ERROR: It thinks sys.prefix is u'/System/Library/Frameworks/Python.framework/Versions/2.7' (should be u'/Users/myusername/Code/python/club/club_env')
ERROR: virtualenv is not compatible with this system or executable

Could someone please explain

  1. What is happening here, so that I understand the problem, and
  2. How I can fix this, and
  3. If there was something I should have done differently from the beginning?

Upvotes: 0

Views: 975

Answers (2)

Jonathan
Jonathan

Reputation: 2855

You need to reinstall `virtualenv in the new Python 2.7.5 default environment and then you will be able to create new virtual environments again.

Upvotes: 1

Steve Barnes
Steve Barnes

Reputation: 28405

I notice that you don't mention which python you upgraded from but my best guess of your problem:

  1. You are telling virtualenv that the actuall python executable is in club_env/build/python - Is it?
  2. Tell virtualenv where python really is or just accept the defaul behavour and see what that gets you.
  3. A couple of answers spring to mind but they would get me slapped.

Upvotes: 1

Related Questions