本文介绍了无法使用Nuitka编译Python的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试编译使用urllib.request,BeautifulSoup和网络浏览器.
I'm trying to compile Python file which uses urllib.request, BeautifulSoup, andwebbrowser.
$ nuitka python.py
Nuitka:WARNING:python.py:16: Cannot find 'urllib.request' as relative or absolute import.
Nuitka:WARNING:python.py:17: Cannot find 'bs4' as relative or absolute import.
$ ./python.exe
Traceback (most recent call last):
File "python.py", line 16, in <module>
from urllib.request import urlopen
ImportError: No module named request
推荐答案
尝试在Nuitka执行期间将--recurse-to=urllib
添加到命令行.有关详细信息,请参见Nuitka帮助.
Try to add --recurse-to=urllib
to command line during Nuitka execution.See Nuitka help for details.
这篇关于无法使用Nuitka编译Python的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!