Errors trying to build distribution

3.9 should work. I don’t recommend using 2.7. That version is deprecated.

I’m going to try to deploy a simple program using requests and numpy and get back to you.

Everything works for me, building on Linux and targeting macOS, Linux and Windows. You need to put all the dependencies, including the optional ones, in your requirements.txt. Otherwise it will pick up the system version of your libraries and it won’t work on the platform you’re building for.

My requirements.txt looked like this:

panda3d==1.10.8.dev62
numpy
requests
bcrypt
cryptography

(I used a pre-release build of 1.10.8 so that I could test the upcoming version of Panda3D that I am about to release, but I don’t have a strong reason to believe it would be different on 1.10.7)

I will add a warning to build_apps if it is picking up a binary dependency from your system instead of from a downloaded wheel.

Thank you for reseaching. I guess the python config is the problem. I have python3 set as my user default, but must be picking up requests from python 2. Adding the two sub modules helped, reduced the ‘missing’ list, but I still have:

[‘Cookie’, ‘OpenSSL.SSL’, ‘OpenSSL.crypto’, ‘StringIO’, ‘builtin’, ‘_winapi’, ‘backports.ssl_match_hostname’, ‘brotli’, ‘collections.Callable’, ‘collections.Mapping’, ‘collections.MutableMapping’, ‘cookielib’, ‘cryptography.x509.UnsupportedExtension’, ‘dummy_threading’, ‘packages.six.moves’, ‘packages.six.moves.http_client’, ‘packages.six.moves.urllib.parse’, ‘packages.ssl_match_hostname.CertificateError’, ‘packages.ssl_match_hostname.match_hostname’, ‘pep517’, ‘simplejson’, ‘socks’, ‘urllib.getproxies’, ‘urllib.getproxies_environment’, ‘urllib.proxy_bypass’, ‘urllib.proxy_bypass_environment’, ‘urllib.quote’, ‘urllib.quote_plus’, ‘urllib.unquote’, ‘urllib.unquote_plus’, ‘urllib.urlencode’, ‘urllib2’, ‘urlparse’, ‘util.SKIPPABLE_HEADERS’, ‘util.SKIP_HEADER’, ‘zipimport’]

Success! adding pep517 got rid of all the remaining requests errors. So now I either have to figure out the same for numpy/pandas or avoid using them.

Thank you for your help.

FYI in case it helps with a problem for others or in case you see something, below is a list of the missing modules related to numpy (or my use of requests). Interestingly, adding scipy and setuptools to requirements.txt was accepted, they were downloaded, but did not make any errors go away.

requirements.txt:
panda3d==1.10.7
numpy
pandas
packages
scipy
setuptools
requests
bcrypt
cryptography
pep517

There are some missing modules: [‘AppKit’, ‘Cookie’, ‘Foundation’, ‘IPython’, ‘IPython.core.formatters’, ‘Numeric’, ‘OpenSSL.SSL’, ‘OpenSSL.crypto’, ‘PyQt4’, ‘PyQt4.QtGui’, ‘PyQt5’, ‘PyQt5.QtWidgets’, ‘StringIO’, ‘UserDict’, ‘builtin’, ‘svn_version’, ‘_dummy_thread’, ‘_ivp.BDF’, ‘_ivp.DOP853’, ‘_ivp.DenseOutput’, ‘_ivp.LSODA’, ‘_ivp.OdeSolution’, ‘_ivp.OdeSolver’, ‘_ivp.RK23’, ‘_ivp.RK45’, ‘_ivp.Radau’, ‘_ivp.solve_ivp’, ‘_overlapped’, ‘trlib.get_trlib_quadratic_subproblem’, ‘trustregion_constr.minimize_trustregion_constr’, ‘uarray.Function’, ‘winapi’, ‘asyncio.DefaultEventLoopPolicy’, ‘backports.ssl_match_hostname’, ‘botocore.exceptions’, ‘brotli’, ‘bs4’, ‘cPickle’, ‘cStringIO’, ‘cffi.pycparser’, ‘collections.Callable’, ‘collections.Iterable’, ‘collections.Mapping’, ‘collections.MutableMapping’, ‘com.sun’, ‘com.sun.jna’, ‘com.sun.jna.platform’, ‘compat.long’, ‘compat.unicode’, ‘cookielib’, ‘core.abs’, ‘core.max’, ‘core.min’, ‘core.round’, ‘cryptography.x509.UnsupportedExtension’, ‘dateutil.tz.tzfile’, ‘dummy.Process’, ‘dummy_thread’, ‘dummy_threading’, ‘fsspec.core’, ‘hypothesis’, ‘importlib_metadata’, ‘linalg.norm’, ‘lxml.etree’, ‘lxml.html’, ‘matplotlib’, ‘matplotlib.artist’, ‘matplotlib.axes’, ‘matplotlib.cm’, ‘matplotlib.collections’, ‘matplotlib.colors’, ‘matplotlib.dates’, ‘matplotlib.lines’, ‘matplotlib.patches’, ‘matplotlib.pyplot’, ‘matplotlib.table’, ‘matplotlib.ticker’, ‘matplotlib.transforms’, ‘matplotlib.units’, ‘multiprocessing.AuthenticationError’, ‘multiprocessing.BufferTooShort’, ‘multiprocessing.TimeoutError’, ‘multiprocessing.get_context’, ‘multiprocessing.get_start_method’, ‘multiprocessing.set_start_method’, ‘nose’, ‘nose.plugins’, ‘nose.plugins.base’, ‘nose.plugins.builtin’, ‘nose.plugins.errorclass’, ‘nose.util’, ‘numarray’, ‘numexpr’, ‘numpy.ComplexWarning’, ‘numpy.Inf’, ‘numpy.NINF’, ‘numpy.absolute’, ‘numpy.amax’, ‘numpy.amin’, ‘numpy.any’, ‘numpy.append’, ‘numpy.arange’, ‘numpy.arccos’, ‘numpy.arccosh’, ‘numpy.arcsin’, ‘numpy.arcsinh’, ‘numpy.arctan’, ‘numpy.arctan2’, ‘numpy.argmax’, ‘numpy.argmin’, ‘numpy.argsort’, ‘numpy.around’, ‘numpy.array’, ‘numpy.asanyarray’, ‘numpy.asarray’, ‘numpy.asarray_chkfinite’, ‘numpy.asfarray’, ‘numpy.atleast_1d’, ‘numpy.atleast_2d’, ‘numpy.block’, 'numpy.bool’, ‘numpy.cast’, ‘numpy.ceil’, ‘numpy.clip’, ‘numpy.compat.asbytes’, ‘numpy.compat.asstr’, ‘numpy.compat.asunicode’, ‘numpy.compat.bytes’, ‘numpy.compat.contextlib_nullcontext’, ‘numpy.compat.integer_types’, ‘numpy.compat.is_pathlib_path’, ‘numpy.compat.isfileobj’, ‘numpy.compat.long’, ‘numpy.compat.npy_load_module’, ‘numpy.compat.open_latin1’, ‘numpy.compat.os_PathLike’, ‘numpy.compat.os_fspath’, ‘numpy.compat.pickle’, ‘numpy.compat.unicode’, ‘numpy.compress’, ‘numpy.concatenate’, ‘numpy.conj’, ‘numpy.conjugate’, ‘numpy.core.Inf’, ‘numpy.core.add’, ‘numpy.core.all’, ‘numpy.core.amax’, ‘numpy.core.amin’, ‘numpy.core.arange’, ‘numpy.core.argsort’, ‘numpy.core.array’, ‘numpy.core.array2string’, ‘numpy.core.array_repr’, ‘numpy.core.asanyarray’, ‘numpy.core.asarray’, ‘numpy.core.atleast_1d’, ‘numpy.core.atleast_2d’, ‘numpy.core.atleast_3d’, 'numpy.core.bool’, ‘numpy.core.cdouble’, ‘numpy.core.complexfloating’, ‘numpy.core.conjugate’, ‘numpy.core.count_nonzero’, ‘numpy.core.csingle’, ‘numpy.core.divide’, ‘numpy.core.dot’, ‘numpy.core.double’, ‘numpy.core.dtype’, ‘numpy.core.empty’, ‘numpy.core.empty_like’, ‘numpy.core.errstate’, ‘numpy.core.fastCopyAndTranspose’, ‘numpy.core.finfo’, ‘numpy.core.float32’, 'numpy.core.float’, ‘numpy.core.geterrobj’, ‘numpy.core.hstack’, ‘numpy.core.iinfo’, ‘numpy.core.inexact’, ‘numpy.core.inf’, ‘numpy.core.intc’, ‘numpy.core.integer’, ‘numpy.core.intp’, ‘numpy.core.isfinite’, ‘numpy.core.isinf’, ‘numpy.core.isnan’, ‘numpy.core.isnat’, ‘numpy.core.isscalar’, ‘numpy.core.linspace’, ‘numpy.core.matmul’, ‘numpy.core.moveaxis’, ‘numpy.core.multiply’, ‘numpy.core.ndarray’, ‘numpy.core.newaxis’, ‘numpy.core.number’, 'numpy.core.object’, ‘numpy.core.ones’, ‘numpy.core.product’, ‘numpy.core.result_type’, ‘numpy.core.roll’, ‘numpy.core.sign’, ‘numpy.core.signbit’, ‘numpy.core.single’, ‘numpy.core.sort’, ‘numpy.core.sqrt’, ‘numpy.core.sum’, ‘numpy.core.swapaxes’, ‘numpy.core.take’, ‘numpy.core.transpose’, ‘numpy.core.ufunc’, ‘numpy.core.vstack’, ‘numpy.core.zeros’, ‘numpy.cos’, ‘numpy.cosh’, ‘numpy.count_nonzero’, ‘numpy.cov’, ‘numpy.deprecate’, ‘numpy.diag’, ‘numpy.diff’, ‘numpy.dot’, ‘numpy.double’, ‘numpy.dtype’, ‘numpy.einsum’, ‘numpy.empty’, ‘numpy.empty_like’, ‘numpy.exp’, ‘numpy.expand_dims’, ‘numpy.expm1’, ‘numpy.extract’, ‘numpy.eye’, ‘numpy.fft.fft’, ‘numpy.fft.fftfreq’, ‘numpy.fft.fftshift’, ‘numpy.fft.ifft’, ‘numpy.fft.ifftshift’, ‘numpy.fft.irfft’, ‘numpy.fft.rfftfreq’, ‘numpy.finfo’, ‘numpy.flatnonzero’, ‘numpy.float64’, 'numpy.float’, ‘numpy.floor’, ‘numpy.frombuffer’, ‘numpy.full’, ‘numpy.greater’, ‘numpy.histogramdd’, ‘numpy.hstack’, ‘numpy.hypot’, ‘numpy.iinfo’, ‘numpy.imag’, ‘numpy.inexact’, ‘numpy.inf’, ‘numpy.infty’, ‘numpy.inner’, 'numpy.int’, ‘numpy.integer’, ‘numpy.intp’, ‘numpy.iscomplex’, ‘numpy.iscomplexobj’, ‘numpy.isfinite’, ‘numpy.isinf’, ‘numpy.isscalar’, ‘numpy.issubdtype’, ‘numpy.lib.add_newdoc’, ‘numpy.lib.i0’, ‘numpy.lib.imag’, ‘numpy.lib.iscomplexobj’, ‘numpy.lib.real’, ‘numpy.linalg.LinAlgError’, ‘numpy.linalg.cond’, ‘numpy.linalg.eigvals’, ‘numpy.linalg.inv’, ‘numpy.linalg.lstsq’, ‘numpy.linalg.matrix_power’, ‘numpy.linalg.norm’, ‘numpy.linalg.pinv’, ‘numpy.linalg.svd’, ‘numpy.linspace’, ‘numpy.load’, ‘numpy.log’, ‘numpy.log10’, ‘numpy.log1p’, ‘numpy.logical_and’, ‘numpy.logical_not’, ‘numpy.logspace’, ‘numpy.ma.MAError’, ‘numpy.ma.MaskedArray’, ‘numpy.ma.filled’, ‘numpy.ma.getdata’, ‘numpy.ma.getmaskarray’, ‘numpy.ma.make_mask_descr’, ‘numpy.ma.masked’, ‘numpy.ma.masked_array’, ‘numpy.ma.nomask’, ‘numpy.matrix’, ‘numpy.mgrid’, ‘numpy.mintypecode’, ‘numpy.mod’, ‘numpy.nan’, ‘numpy.nan_to_num’, ‘numpy.ndarray’, ‘numpy.newaxis’, ‘numpy.nonzero’, ‘numpy.ones’, ‘numpy.outer’, ‘numpy.pi’, ‘numpy.piecewise’, ‘numpy.place’, ‘numpy.poly’, ‘numpy.poly1d’, ‘numpy.polyint’, ‘numpy.polyval’, ‘numpy.power’, ‘numpy.prod’, ‘numpy.putmask’, 'numpy.r’, ‘numpy.random.rand’, ‘numpy.random.randn’, ‘numpy.ravel’, ‘numpy.real’, ‘numpy.recarray’, ‘numpy.reshape’, ‘numpy.resize’, ‘numpy.result_type’, ‘numpy.roots’, ‘numpy.searchsorted’, ‘numpy.shape’, ‘numpy.sign’, ‘numpy.sin’, ‘numpy.sinc’, ‘numpy.single’, ‘numpy.sinh’, ‘numpy.sort’, ‘numpy.sqrt’, ‘numpy.squeeze’, ‘numpy.sum’, ‘numpy.take’, ‘numpy.tan’, ‘numpy.tanh’, ‘numpy.testing.IS_PYPY’, ‘numpy.testing.jiffies’, ‘numpy.testing.memusage’, ‘numpy.testing.suppress_warnings’, ‘numpy.transpose’, ‘numpy.trapz’, ‘numpy.tril’, ‘numpy.triu’, ‘numpy.unique’, ‘numpy.vdot’, ‘numpy.vectorize’, ‘numpy.vstack’, ‘numpy.where’, ‘numpy.zeros’, ‘numpy.zeros_like’, ‘numpy_distutils’, ‘numpy_distutils.command.build_flib’, ‘numpy_distutils.command.cpuinfo’, ‘numpy_distutils.cpuinfo’, ‘numpy_distutils.fcompiler’, ‘odf.config’, ‘odf.element’, ‘odf.namespaces’, ‘odf.opendocument’, ‘odf.style’, ‘odf.table’, ‘odf.text’, ‘openpyxl’, ‘openpyxl.style’, ‘openpyxl.styles’, ‘openpyxl.workbook’, ‘ordereddict’, ‘org.python.modules.posix.PosixModule’, ‘packages.six.moves’, ‘packages.six.moves.http_client’, ‘packages.six.moves.urllib.parse’, ‘packages.ssl_match_hostname.CertificateError’, ‘packages.ssl_match_hostname.match_hostname’, ‘pickle5’, ‘pkg_resources.extern.appdirs’, ‘pkg_resources.extern.packaging’, ‘psutil’, ‘pyarrow’, ‘pyarrow.orc’, ‘pyarrow.parquet’, ‘pytest’, ‘pyxlsb’, ‘qtpy’, ‘qtpy.QtWidgets’, ‘s3fs’, ‘scikits.umfpack’, ‘scipy.constants.golden’, ‘scipy.integrate.ode’, ‘scipy.interpolate.PPoly’, ‘scipy.interpolate.interp1d’, ‘scipy.linalg.LinAlgError’, ‘scipy.linalg.LinAlgWarning’, ‘scipy.linalg._cblas’, ‘scipy.linalg._clapack’, ‘scipy.linalg.block_diag’, ‘scipy.linalg.cho_factor’, ‘scipy.linalg.cho_solve’, ‘scipy.linalg.cho_solve_banded’, ‘scipy.linalg.cholesky’, ‘scipy.linalg.cholesky_banded’, ‘scipy.linalg.eig’, ‘scipy.linalg.eigh’, ‘scipy.linalg.get_blas_funcs’, ‘scipy.linalg.get_lapack_funcs’, ‘scipy.linalg.hankel’, ‘scipy.linalg.inv’, ‘scipy.linalg.lstsq’, ‘scipy.linalg.lu_factor’, ‘scipy.linalg.lu_solve’, ‘scipy.linalg.norm’, ‘scipy.linalg.orthogonal_procrustes’, ‘scipy.linalg.qr’, ‘scipy.linalg.qr_insert’, ‘scipy.linalg.solve’, ‘scipy.linalg.solve_banded’, ‘scipy.linalg.solve_triangular’, ‘scipy.linalg.svd’, ‘scipy.linalg.svdvals’, ‘scipy.linalg.toeplitz’, ‘scipy.misc.derivative’, ‘scipy.ndimage.convolve1d’, ‘scipy.optimize.OptimizeResult’, ‘scipy.optimize.brentq’, ‘scipy.optimize.minimize’, ‘scipy.signal.convolve’, ‘scipy.signal.dlti’, ‘scipy.sparse.SparseEfficiencyWarning’, ‘scipy.sparse.bmat’, ‘scipy.sparse.coo_matrix’, ‘scipy.sparse.csc_matrix’, ‘scipy.sparse.csr_matrix’, ‘scipy.sparse.eye’, ‘scipy.sparse.find’, ‘scipy.sparse.issparse’, ‘scipy.sparse.isspmatrix’, ‘scipy.sparse.isspmatrix_csc’, ‘scipy.sparse.isspmatrix_csr’, ‘scipy.sparse.linalg.LinearOperator’, ‘scipy.sparse.linalg.aslinearoperator’, ‘scipy.sparse.linalg.gmres’, ‘scipy.sparse.linalg.lsmr’, ‘scipy.sparse.linalg.onenormest’, ‘scipy.sparse.linalg.splu’, ‘scipy.sparse.linalg.spsolve’, ‘scipy.sparse.spdiags’, ‘scipy.spatial.cKDTree’, ‘scipy.special.airy’, ‘scipy.special.beta’, ‘scipy.special.betaln’, ‘scipy.special.chndtr’, ‘scipy.special.comb’, ‘scipy.special.entr’, ‘scipy.special.factorial’, ‘scipy.special.gammaln’, ‘scipy.special.ive’, ‘scipy.special.psi’, ‘scipy.special.rel_entr’, ‘scipy.special.roots_legendre’, ‘scipy.special.sinc’, ‘scipy.special.xlogy’, ‘scipy.stats.chisquare’, ‘scipy.stats.gmean’, ‘scipy.stats.hmean’, ‘scipy.stats.iqr’, ‘scipy.stats.kendalltau’, ‘scipy.stats.scoreatpercentile’, ‘scipy.stats.spearmanr’, ‘scipy.stats.zmap’, ‘scipy.stats.zscore’, ‘sets’, ‘setuptools.extern.ordered_set’, ‘setuptools.extern.packaging’, ‘setuptools.extern.packaging.specifiers’, ‘setuptools.extern.packaging.tags’, ‘setuptools.extern.packaging.utils’, ‘setuptools.extern.packaging.version’, ‘simplejson’, ‘sitecustomize’, ‘sksparse.cholmod’, ‘socks’, ‘sparse’, ‘special.rel_entr’, ‘sqlalchemy’, ‘sqlalchemy.schema’, ‘sqlalchemy.types’, ‘tables’, ‘testing.Tester’, ‘thread’, ‘uarray’, ‘urllib.getproxies’, ‘urllib.getproxies_environment’, ‘urllib.proxy_bypass’, ‘urllib.proxy_bypass_environment’, ‘urllib.quote’, ‘urllib.quote_plus’, ‘urllib.unquote’, ‘urllib.unquote_plus’, ‘urllib.urlencode’, ‘urllib2’, ‘urlparse’, ‘util.SKIPPABLE_HEADERS’, ‘util.SKIP_HEADER’, ‘win32com.shell’, ‘win32con’, ‘win32pdh’, ‘wincertstore’, ‘windows.get_window’, ‘windows.hanning’, ‘xlrd’, ‘xlsxwriter’, ‘xlwt’, ‘zipimport’, ‘zipp’]

BTW, running the built app from terminal, the error has changed:
ImportError: C extension: No module named ‘pandas._libs.tslibs.base’ not built. If you want to import pandas from the source directory, you may need to run ‘python setup.py build_ext --inplace --force’ to build the C extensions first.

I ran that command, of course, no change. Seems to point to a configuration error.

Uninstalling and re-installing panda3d, numpy, and pandas did not help.

You may need to tell build_apps to explicitly include that module. I think you can add it to include_modules, or explicitly import pandas._libs.tslibs.base somewhere in your application, to force it to be included.

That did it, thank you! Surprising to me, forcing pandas in requirements.txt and in setup.py did not work, but that line in the file that uses pandas makes the build work.

Thank you very much. Sorry for the trouble.

Except the windows build. Do I have to do the Windows build on a Windows machine? I get
There are some missing modules: [’_bisect’, ‘_blake2’, ‘_codecs_cn’, ‘_codecs_hk’, ‘_codecs_iso2022’, ‘_codecs_jp’, ‘_codecs_kr’, ‘_codecs_tw’, ‘_contextvars’, ‘_csv’, ‘_curses’, ‘_datetime’, ‘_heapq’, ‘_json’, ‘_md5’, ‘_multibytecodec’, ‘_opcode’, ‘_pickle’, ‘_posixshmem’, ‘_posixsubprocess’, ‘_random’, ‘_sha1’, ‘_sha256’, ‘_sha3’, ‘_sha512’, ‘_statistics’, ‘_struct’, ‘_testcapi’, ‘_testinternalcapi’, ‘array’, ‘binascii’, ‘grp’, ‘math’, ‘mmap’, ‘resource’, ‘zlib’]

and then it errors out at:
AttributeError: ‘array.array’ object has no attribute ‘fromstring’

It does build an exe, I have to find a windows machine to try it.

It’s a known issue that will be fixed soon in Panda, just edit the file in which that AttributeError occurs and change fromstring in that line to frombytes.

Thank you, that fixed it of course. I saw the discussion of this in some other thread but I thought the conclusion was that it was fixed in the current (.7) release. Anyway, thank you for your time and help.

I finished my first (simple) game now, and comparing it to the same game in GODOT, I much prefer panda3d.

1 Like

Except the windows build. Do I have to do the Windows build on a Windows machine?

In principle you don’t have to do the Windows build on a Windows machine. The warnings show up because the system detects all import statements in all modules and tries to pick up those modules transitively; however, some of these import statements are conditional and not always performed, such as ones that are under a platform check. But the system is unable to determine this, and can therefore issue spurious warnings like this. I’d only worry about the warnings when you get errors at runtime.

Some of these other warnings don’t appear to be legitimate warnings. numpy.amax et al, are functions, not modules. The warning system may need to be adjusted, I’ll look into that.

Thank you. Great stuff. The only tricky parts of building this game were making the distribution and centering images on a wall. The rest went pretty smoothly. The manuals were fine and enough examples. Took me a lot less time than figuring out GODOT and it is pure python.

I’m glad to hear it!

I found out the cause of most of the erroneous warnings; there’s a bug in the “modulefinder” module from the Python standard library that causes it not to work with a particular thing that numpy is doing (a lot of relative star imports).

A workaround will be in the upcoming 1.10.8 release of Panda.

1 Like

Apparently still problems with the Windows and Linux builds:

I will try to track them down. Linux appears to be still a pandas problem.