When I try to compile and .exe I get ImportError: No module named six

限于喜欢 提交于 2019-12-14 02:26:17

问题


I've tried making an exe from a program using py2exe, cx_freeze and pyinstaller. All of which give me an error 'ImportError: No module named six' when I go to launch the .exe

The .exe is able to be created. I've looked through the forums and all of them say to pip install six (it's already installed). I've tried uninstalling and re-installing six.

One post mentioned uninstalling matplotlib, so I did that.

When I instlalled pyinstaller one of the requirements was that six be installed! So this is very baffling.


回答1:


http://i289.photobucket.com/albums/ll233/89733/stacked_help_zpsnrvlayj4.jpg

After Gabriel asked for the screenshot I took a closer look.

pip install urllib3 --upgrade solved the issue, which I found here:

https://github.com/transifex/transifex-client/issues/103




回答2:


When you create a .exe file using cx_freeze it kind of compiles all the needed libraries into the .exe folder, you probably had to configurate a setup file from cx_freeze to be able to create the .exe, right? There you must "tell" cx_freeze which libraries are going to be needed when someone runs the program.

Keep in mind that when you create a .exe you dont need to have python neither six to run it.



来源:https://stackoverflow.com/questions/44057174/when-i-try-to-compile-and-exe-i-get-importerror-no-module-named-six

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!