Running an exe compiled in py2exe is now giving me this error:
C:\Users\digiholic\git\universalSmashSystem\main.exe\zipextimporter.py:82: RuntimeWarning: import display: No module named _view (ImportError: No module named _view) C:\Users\digiholic\git\universalSmashSystem\main.exe\zipextimporter.py:82: RuntimeWarning: import draw: No module named _view (ImportError: No module named _view) C:\Users\digiholic\git\universalSmashSystem\main.exe\zipextimporter.py:82: RuntimeWarning: import image: No module named _view (ImportError: No module named _view) C:\Users\digiholic\git\universalSmashSystem\main.exe\zipextimporter.py:82: RuntimeWarning: import pixelcopy: No module named _view (ImportError: No module named _view) C:\Users\digiholic\git\universalSmashSystem\main.exe\zipextimporter.py:82: RuntimeWarning: import transform: No module named _view (ImportError: No module named _view)
I did not modify my py2exe file since the last working build, nor have I made any significant changes to my Python installation. I have modified code, which must be causing this issue, but the error message is giving me no information on how to fix it. What could cause this issue?
I have put import pygame._view
at the top of my main.py script and it is not helping. I do not reference any system fonts, all fonts used in my code are .ttf files in my package.
EDIT: Searched more. import re
is not working either.
2 Answers
Answers 1
The solution is to add import pygame._view to the top of your main source file. Any of the packagers should work after that.
Try to do so. Some similar question was already asked in the past.
Please check also Pygame to exe display module error [duplicate] and Opening an EXE of my Pygame program gives me import errors
IF you look at the second answer the problem was in the "font" usage. Maybe you did something similar :-) Try it out and let us know.
Unfortunately I am not personally using pygame module :-( but I guess for the defined _view you have to use the import as you did correctly :-)
Hope this solve your query :-) Have a nice day.
Answers 2
This is looking like a PYTHONPATH issue. You need to verify that all of the locations where these modules are located are either in the development directory itself or in your search path for Python.
You can do a:
print sys.path
to see what is in your search path and validate those modules are in it. It is possible something changed it. Once you verify that, you can add the missing paths using PYTHONPATH.
0 comments:
Post a Comment