我正在使用py2exe创建一个python可执行文件(遵循这个)。当从cmd运行时,.exe文件显示一个错误消息"ImportError: No module named“,尽管我已经安装了mechanize并将其放在site-packages文件夹中。我该如何解决这个问题?其目的是创建一个可以在其他Windows计算机上运行的包,而不需要安装Python。
Answer marked below. It was two problems. I was missing a semicolon in the env var path, and the latest Beautiful Soup is incompatible with my python script. Using an older version allowed it to run.
我试图安装漂亮汤在Windows中使用"Setup.py安装“从一个CMD窗口。
我知道下面的错误..。
Z:\Installers\beautifulsoup4-4.1.0>setup