是的,我想在PyCharm中创建一个运行配置来运行Pyinstaller并获取可执行文件.根据Pyinstaller documentation,安装后应该能够找到名为pyinstaller-folder/pyinstaller.py
的python脚本,但它不在那里.然后我仔细看了看,发现另一个名字是pyinstaller-folder/__main__.py
,应该是一样的<--(我胡乱猜测),所以我设置了我的 run 配置如下:
运行后,会出现以下错误:
/usr/local/Cellar/python3/3.4.3/bin/python3.4 /usr/local/lib/python3.4/sit
e-packages/PyInstaller/__main__.py --onefile --nowindow --osx-bundle-identifier=jg.optimizer -F --name=genoptimizer optimizer/manage.py
Traceback (most recent call last):
File "/usr/local/lib/python3.4/site-packages/PyInstaller/__main__.py", line 26, in <module>
from . import __version__
SystemError: Parent module '' not loaded, cannot perform relative import
Process finished with exit code 1
它似乎需要一个父模块来运行,但这看起来会是什么样子?