How to use virtualenv in 32-bit Python on a 64-bit machine?
Asked Answered
D

1

6

I've been plugging away at this for a few hours now and am having a heck of a time.

The 3rd error says to copy the DLL, meanwhile it is already there by default.

C:\Windows\system32>virtualenv django-josh
New python executable in django-josh\Scripts\python.exe
ERROR: The executable django-josh\Scripts\python.exe is not functioning
ERROR: It thinks sys.prefix is u'c:\\windows\\syswow64\\django-josh' (should be u'c:\\windows\\system32\\django-josh')
ERROR: virtualenv is not compatible with this system or executable
Note: some Windows users have reported this error when they installed Python for "Only this user" or have multiple versions of Python installed. Copying the appropriate PythonXX.dll to the virtualenv Scripts/ directory may fix this problem.

I've been reading this and want to note, I had Python 3 installed a while back, but then installed Python 2.7 and removed Python 3 after. I'm wondering if there's still a trace of Python 3 on my computer somewhere, even though I can't find anything.

Update: I was able to get it working with this command (using an option), but I'm not sure if that's correct.

C:\Windows\system32>virtualenv --distribute C:\Python27\envs\django
New python executable in C:\Python27\envs\django\Scripts\python.exe
Installing setuptools, pip...done.

Thanks so much!

Dowson answered 17/5, 2014 at 23:3 Comment(1)
Could you copy and paste the output into a code block rather than taking a screenshot and posting as an image? Then it's easier to cite in any answers and will be found in search results if anyone else has this problem.Lesslie
L
0

--distribute uses Distribute, a fork of Setuptools that is no longer maintained. It has since been merged back into Setuptools. In general, I'd recommend against using this option. You can use the -p option with the path to an executable to specify which Python interpreter to use. That way, you can be sure you're not using Python 3. It looks like you're creating your environment under C:\Python27, but I'm not convinced that your virtualenv will know to use 2.7 just by having it in that location.

Lashkar answered 2/6, 2014 at 15:25 Comment(2)
How can I be sure Python 3 is gone?Dowson
Activate your virtualenv, start a Python shell, then type: import sys; print (sys.version)Lashkar

© 2022 - 2024 — McMap. All rights reserved.