I am having trouble running a compiled build containing pyproj. I have used pyinstaller to compile and keep running into the 'cannot import name error' at runtime. This is a similar type of error to what I've reported here regarding PIL. Specifically with regards to naming conventions and the type of error.
A similar qustion has been asked here although I didn't find their suggestion fixed the error in my case.
I've added in the _proj.pyd as a binary to the build folder and referenced in the spec file but to no avail.
Incidentally, can anyone explain what is the deal with certain modules being called by the underscore naming convention rather than the capital? In this instance, _proj rather than Proj. These types of modules also usually only contain a .pyd and not a .py in their module folder, resulting in the compiler getting confused when compiling to executables. Noticing a similar pattern with problem modules and don't really understand it.
import _socket # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI53882\_socket.pyd
import parser # builtin
import win32api # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI53882\win32api.pyd
import pywintypes # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI53882\pywintypes27.dll
import pythoncom # dynamically loaded from C:\Users\Hp\AppData\Local\Temp\_MEI53882\pythoncom27.dll
Traceback (most recent call last):
File "<string>", line 50, in <module>
File "C:\Python27\Lib\site-packages\PyInstaller\loader\pyi_importers.py", line 270, in load_module
exec(bytecode, module.__dict__)
File "C:\Users\Hp\PycharmProjects\GISdev\build\gis_helper2\out00-PYZ.pyz\pyproj", line 50, in <module>
ImportError: cannot import name _proj