问题
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