Hi! I am trying to deploy a project which uses numpy. Here is a minimal example which shows my issue.
This is my requirements.txt :
panda3d==1.10.6
numpy
This is my setup.py :
from direct.dist.commands import bdist_apps
from setuptools import setup
setup(
name='TryNumpy',
options={
'build_apps': {
'log_filename': '$USER_APPDATA/TryNumpy/trynumpy.log',
'plugins': ['pandagl'],
'gui_apps': {'trynumpy': 'main.py'},
'platforms': ['manylinux1_x86_64'],
},
'bdist_apps': {
'installers': {
'manylinux1_x86_64': ['xztar']}}})
This is my main.py :
import numpy
from direct.showbase.ShowBase import ShowBase
class Program(ShowBase):
def __init__(self):
ShowBase.__init__(self)
Program().run()
When I try to build it, I get this:
$ python setup.py bdist_apps
running bdist_apps
running build_apps
Building platforms: manylinux1_x86_64
Gathering wheels for platform: manylinux1_x86_64
Looking in indexes: https://pypi.org/simple, https://archive.panda3d.org/simple/opt, https://archive.panda3d.org/thirdpa
rty
Collecting panda3d==1.10.6 (from -r /home/flavio/build_numpy/requirements.txt (line 1))
File was already downloaded /home/flavio/build_numpy/build/__whl_cache__/manylinux1_x86_64_cp36m/panda3d-1.10.6+opt-cp
36-cp36m-manylinux1_x86_64.whl
Collecting numpy (from -r /home/flavio/build_numpy/requirements.txt (line 2))
File was already downloaded /home/flavio/build_numpy/build/__whl_cache__/manylinux1_x86_64_cp36m/numpy-1.18.5-cp36-cp3
6m-manylinux1_x86_64.whl
Successfully downloaded panda3d numpy
WARNING: You are using pip version 19.2.3, however version 20.1.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Building runtime for platform: manylinux1_x86_64
There are some missing modules: ['ConfigParser', 'Numeric', 'StringIO', '__builtin__', '__svn_version__', '_distutils_fi
ndvs', '_manylinux', '_psutil_windows', '_scproxy', '_winapi', 'apport_python_hook', 'backports.ssl_match_hostname', 'cf
fi', 'com.sun', 'com.sun.jna', 'com.sun.jna.platform', 'commands', 'compat.long', 'copy_reg', 'core.abs', 'core.max', 'c
ore.min', 'core.round', 'cpickle', 'ctypes.macholib.dyld', 'dummy.Process', 'dummy_thread', 'extern.six', 'fcompiler.FCo
mpiler', 'fcompiler.has_f90_header', 'fcompiler.is_f_file', 'future_builtins', 'multiprocessing.AuthenticationError', 'm
ultiprocessing.BufferTooShort', 'multiprocessing.SimpleQueue', 'multiprocessing.TimeoutError', 'multiprocessing.get_cont
ext', 'multiprocessing.get_start_method', 'multiprocessing.set_start_method', 'netbios', 'nose', 'nose.plugins', 'nose.p
lugins.base', 'nose.plugins.builtin', 'nose.plugins.errorclass', 'nose.util', 'numarray', 'numpy.amax', 'numpy.amin', 'n
umpy.array', 'numpy.bool_', 'numpy.compat.asbytes', 'numpy.compat.asstr', 'numpy.compat.asunicode', 'numpy.compat.basest
ring', 'numpy.compat.bytes', 'numpy.compat.contextlib_nullcontext', 'numpy.compat.integer_types', 'numpy.compat.is_pathl
ib_path', 'numpy.compat.isfileobj', 'numpy.compat.long', 'numpy.compat.npy_load_module', 'numpy.compat.open_latin1', 'nu
mpy.compat.os_PathLike', 'numpy.compat.os_fspath', 'numpy.compat.pickle', 'numpy.compat.unicode', 'numpy.core.Inf', 'num
py.core.add', 'numpy.core.all', 'numpy.core.amax', 'numpy.core.amin', 'numpy.core.arange', 'numpy.core.array', 'numpy.co
re.array2string', 'numpy.core.array_repr', 'numpy.core.asanyarray', 'numpy.core.asarray', 'numpy.core.atleast_1d', 'nump
y.core.atleast_2d', 'numpy.core.atleast_3d', 'numpy.core.bool_', 'numpy.core.cdouble', 'numpy.core.complexfloating', 'nu
mpy.core.conjugate', 'numpy.core.count_nonzero', 'numpy.core.csingle', 'numpy.core.divide', 'numpy.core.dot', 'numpy.cor
e.double', 'numpy.core.dtype', 'numpy.core.empty', 'numpy.core.empty_like', 'numpy.core.errstate', 'numpy.core.fastCopyA
ndTranspose', '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.c
ore.roll', 'numpy.core.sign', 'numpy.core.signbit', 'numpy.core.single', 'numpy.core.sqrt', 'numpy.core.sum', 'numpy.cor
e.swapaxes', 'numpy.core.take', 'numpy.core.transpose', 'numpy.core.ufunc', 'numpy.core.vstack', 'numpy.core.zeros', 'nu
mpy.deprecate', 'numpy.dtype', 'numpy.expand_dims', 'numpy.eye', 'numpy.fft.fft', 'numpy.fft.ifft', 'numpy.frombuffer',
'numpy.histogramdd', 'numpy.integer', 'numpy.intp', 'numpy.iscomplexobj', 'numpy.lib.i0', 'numpy.lib.imag', 'numpy.lib.i
scomplexobj', 'numpy.lib.real', 'numpy.linalg.eigvals', 'numpy.linalg.inv', 'numpy.linalg.lstsq', 'numpy.linalg.matrix_p
ower', 'numpy.ma.MAError', 'numpy.ma.MaskedArray', 'numpy.ma.filled', 'numpy.ma.getdata', 'numpy.ma.getmaskarray', 'nump
y.ma.make_mask_descr', 'numpy.ma.masked', 'numpy.ma.masked_array', 'numpy.ma.nomask', 'numpy.ndarray', 'numpy.random.ran
d', 'numpy.random.randn', 'numpy.recarray', 'numpy.testing.jiffies', 'numpy.testing.memusage', 'numpy_distutils', 'numpy
_distutils.command.build_flib', 'numpy_distutils.command.cpuinfo', 'numpy_distutils.cpuinfo', 'numpy_distutils.fcompiler
', 'ordereddict', 'org.python.modules.posix.PosixModule', 'pickle5', 'pkg_resources.extern.appdirs', 'pkg_resources.exte
rn.packaging', 'pkg_resources.extern.six', 'pkg_resources.extern.six.moves', 'psutil._psutil_aix', 'psutil._psutil_bsd',
'psutil._psutil_osx', 'psutil._psutil_sunos', 'psutil._psutil_windows', 'pytest', 'sets', 'setuptools.extern.packaging'
, 'setuptools.extern.packaging.utils', 'setuptools.extern.packaging.version', 'setuptools.extern.six', 'setuptools.exter
n.six.moves', 'setuptools.extern.six.moves.configparser', 'testing.Tester', 'thread', 'urllib2', 'urlparse', 'win32com.s
hell', 'win32con', 'win32pdh', 'win32wnet', 'wincertstore']
warning: build_apps: could not find dependency libopenblasp-r0-34a18dc3.3.7.so (referenced by numpy.core._multiarray_uma
th.so)
Copying game files for platform: manylinux1_x86_64
Building xztar for platform: manylinux1_x86_64
When I launch it, I get:
Traceback (most recent call last):
File "/home/flavio/build_numpy/build/__whl_cache__/manylinux1_x86_64_cp36m/numpy-1.18.5-
cp36-cp36m-manylinux1_x86_64.whl/numpy/core/__init__.py", line 24, in
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 1023, in _handle_fr
omlist
_call_with_frames_removed(import_, from_name)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 219, in _call_with_
frames_removed
return f(*args, **kwds)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 971, in _find_and_l
oad
return _find_and_load_unlocked(name, import_)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 955, in _find_and_l
oad_unlocked
module = _load_unlocked(spec)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 665, in _load_unloc
ked
spec.loader.exec_module(module)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 807, in exec_module
exec(code, module.__dict__)
File "/home/flavio/build_numpy/build/__whl_cache__/manylinux1_x86_64_cp36m/numpy-1.18.5-
cp36-cp36m-manylinux1_x86_64.whl/numpy/core/multiarray.py", line 14, in
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 1023, in _handle_fr
omlist
_call_with_frames_removed(import_, from_name)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 219, in _call_with_
frames_removed
return f(*args, **kwds)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 971, in _find_and_l
oad
return _find_and_load_unlocked(name, import_)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 955, in _find_and_l
oad_unlocked
module = _load_unlocked(spec)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 665, in _load_unloc
ked
spec.loader.exec_module(module)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 807, in exec_module
exec(code, module.__dict__)
File "/home/flavio/build_numpy/build/__whl_cache__/manylinux1_x86_64_cp36m/numpy-1.18.5-
cp36-cp36m-manylinux1_x86_64.whl/numpy/core/overrides.py", line 7, in
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 971, in _find_and_l
oad
return _find_and_load_unlocked(name, import_)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 955, in _find_and_l
oad_unlocked
module = _load_unlocked(spec)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 665, in _load_unloc
ked
spec.loader.exec_module(module)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 807, in exec_module
exec(code, module.__dict__)
File "numpy.core._multiarray_umath", line 1, in
File "/home/flavio/venv/lib/python3.6/imp.py", line 343, in load_dynamic
return _load(spec)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 684, in _load
return _load_unlocked(spec)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 658, in _load_unloc
ked
module = module_from_spec(spec)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 571, in module_from
_spec
module = spec.loader.create_module(spec)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap_external.py", line 922, in cr
eate_module
_imp.create_dynamic, spec)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 219, in _call_with_
frames_removed
return f(*args, **kwds)
ImportError: libopenblasp-r0-34a18dc3.3.7.so: cannot open shared object file: No such file
or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "main.py", line 12, in
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 971, in _find_and_l
oad
return _find_and_load_unlocked(name, import_)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 955, in _find_and_l
oad_unlocked
module = _load_unlocked(spec)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 665, in _load_unloc
ked
spec.loader.exec_module(module)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 807, in exec_module
exec(code, module.__dict__)
File "/home/flavio/build_numpy/build/__whl_cache__/manylinux1_x86_64_cp36m/numpy-1.18.5-
cp36-cp36m-manylinux1_x86_64.whl/numpy/__init__.py", line 142, in
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 1023, in _handle_fr
omlist
_call_with_frames_removed(import_, from_name)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 219, in _call_with_
frames_removed
return f(*args, **kwds)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 971, in _find_and_l
oad
return _find_and_load_unlocked(name, import_)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 955, in _find_and_l
oad_unlocked
module = _load_unlocked(spec)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 665, in _load_unloc
ked
spec.loader.exec_module(module)
File "/home/flavio/venv/lib/python3.6/importlib/_bootstrap.py", line 807, in exec_module
exec(code, module.__dict__)
File "/home/flavio/build_numpy/build/__whl_cache__/manylinux1_x86_64_cp36m/numpy-1.18.5-
cp36-cp36m-manylinux1_x86_64.whl/numpy/core/__init__.py", line 50, in
ImportError:
IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!
Importing the numpy C-extensions failed. This error can happen for
many reasons, often due to issues with your setup or how NumPy was
installed.
We have compiled some common reasons and troubleshooting tips at:
https://numpy.org/devdocs/user/troubleshooting-importerror.html
Please note and check the following:
* The Python version is: Python3.6 from "/home/flavio/build_numpy/build/manylinux1_x86_6
4/trynumpy"
* The NumPy version is: "1.18.5"
and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.
Original error was: libopenblasp-r0-34a18dc3.3.7.so: cannot open shared object file: No su
ch file or directory
What is my error? Thank you very much!