gpt4 book ai didi

python - 如何在 64 位机器上使用 32 位 Python 中的 virtualenv?

转载 作者:太空狗 更新时间:2023-10-30 00:19:34 25 4
gpt4 key购买 nike

我已经为此忙了几个小时,现在玩得很开心。

第三个错误说复制DLL,同时它默认已经存在。

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.

我一直在阅读 this并且要注意,我之前安装了 Python 3,但随后安装了 Python 2.7 并在之后删除了 Python 3。我想知道我的计算机上是否还有 Python 3 的痕迹,即使我找不到任何东西。

更新:我能够让它与这个命令一起工作(使用一个选项),但我不确定这是否正确。

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

非常感谢!

最佳答案

--distribute 使用 Distribute,它是不再维护的 Setuptools 的一个分支。它已被合并回 Setuptools。一般来说,我建议不要使用此选项。您可以使用带有可执行文件路径的 -p 选项来指定要使用的 Python 解释器。这样,您可以确定您没有使用 Python 3。看起来您是在 C:\Python27 下创建环境,但我不相信您的 virtualenv 会知道使用 2.7 只是因为它在其中位置。

关于python - 如何在 64 位机器上使用 32 位 Python 中的 virtualenv?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23716948/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com