简体   繁体   English

Windows Python 64和32位版本和点子

[英]Windows Python 64 & 32 bit versions and pip

I have made a simple python script and built a 64-bit Windows executable from it via pyinstaller. 我制作了一个简单的python脚本,并通过pyinstaller从它构建了一个64位的Windows可执行文件。 However, most computers at my office run 32-bit Windows operating systems, thus my program does not work. 但是,我办公室的大多数计算机都运行32位Windows操作系统,因此我的程序不起作用。 From what I have read, it is possible to make an executable for 32-bit systems as long as I use the 32-bit version of python. 根据我的阅读,只要我使用32位版本的python,就可以为32位系统制作可执行文件。 So I went ahead and installed the 32-bit version of python 3.5, but I can't find the way to link pip to the 32-bit version of python so I can install all the necessary modules. 所以我继续安装了32位版本的python 3.5,但我找不到将pip链接到32位版本的python的方法,所以我可以安装所有必要的模块。 Every time I call pip it displays all the modules that are installed on the 64-bit version, even though by default I am running the 32-bit version python. 每次调用pip时,它都会显示64位版本上安装的所有模块,即使默认情况下我运行的是32位版本的python。

I had a similar problem with both 32 and 64-bit versions of Python installed. 安装了32位和64位版本的Python时遇到了类似的问题。 I found if I ran the pip install in the command prompt from the location of pip.exe it worked fine. 我发现如果我从pip.exe的位置在命令提示符下运行pip install它运行正常。 In my case, the file path was the following: 在我的例子中,文件路径如下:

C:\\Program Files\\Python\\3.5\\Scripts C:\\ Program Files \\ Python \\ 3.5 \\ Scripts

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM