[英]Pyinstaller error: ImportError: cannot import name _elementpath
I am trying to convert a single python file into an exe, first it gave me a NameError
, then I solved it using this command: pyinstaller --onefile main.py --copy-metadata pyppeteer
.我正在尝试将单个 python 文件转换为 exe,首先它给了我一个
NameError
,然后我使用以下命令解决了它: pyinstaller --onefile main.py --copy-metadata pyppeteer
。
Now, it gives me this: ImportError: cannot import name _elementpath
.现在,它给了我这个:
ImportError: cannot import name _elementpath
。
I tried you command with pycharm community and the command works well if you have installed pyinstaller and pyppeteer with pip install pyinstaller
and pip install pyppeteer
in the env.我用 pycharm 社区尝试了你的命令,如果你用
pip install pyinstaller
和pip install pyppeteer
pyinstaller 和 pyppeteer,该命令运行良好。
if it doesn't work try to pip uninstall...
and reinstall them.如果它不起作用,请尝试
pip uninstall...
并重新安装它们。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.