Using pyinstaller with two python environments

拥有回忆 提交于 2021-02-08 08:19:18

问题


I'm using pyinstaller to pack one .py file into .exe. I have two Python3 environment on my WIN10 64-bit computer. One is from Anaconda and the other is Python3-32bit which is installed separately. This .py file is produced by Anaconda Python environment. After I installed pyinstaller, I set the environment variable PATH like this:`

PATH=PATH;C:\Anaconda3\Scripts;C:\Python35-32\Scripts;

However, when I enter pyinstaller file.py it throws me lots of warnings:

It seems that pyinstaller searches dependencies in Python35-32's lib folder rather than Anaconda's. How can I make it searche dependencies under Anaconda's lib folder? `


回答1:


Did you install pyinstaller using pip or using (ana)conda? if so, check whether pip is the python3-32bit or the anaconda one with:

pip -V

This will tell you if pip, and hence pyinstaller, was installed on the 32-bit interpreter, hence why it's looking in that particular folder.

solution would be to install pyinstaller using conda or within the anaconda IDE. Probably would need to uninstall pyinstaller from python3-32bit



来源:https://stackoverflow.com/questions/50388833/using-pyinstaller-with-two-python-environments

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!