Hello,
I suddenly started to have this error when I try to install numpy. It's very weird that it is no longer able to find Cython! Any idea how to fix it?
I am using the image from bitbucket as
image: nikolaik/python-nodejs
An error occurred while installing numpy==1.20.3 --hash=sha256:6690080810f77485667bfbff4f69d717c3be25e5b11bb2073e76bb3f578d99b4 --hash=sha256:e515c9a93aebe27166ec9593411c58494fa98e5fcc219e47260d9ab8a1cc7f9f --hash=sha256:f1452578d0516283c87608a5a5548b0cdde15b99650efdfd85182102ef7a7c17 --hash=sha256:43909c8bb289c382170e0282158a38cf306a8ad2ff6dfadc447e90f9961bef43 --hash=sha256:16f221035e8bd19b9dc9a57159e38d2dd060b48e93e1d843c49cb370b0f415fd --hash=sha256:c1c09247ccea742525bdb5f4b5ceeacb34f95731647fe55774aa36557dbb5fa4 --hash=sha256:830b044f4e64a76ba71448fce6e604c0fc47a0e54d8f6467be23749ac2cbd2fb --hash=sha256:ea9cff01e75a956dbee133fa8e5b68f2f92175233de2f88de3a682dd94deda65 --hash=sha256:e55185e51b18d788e49fe8305fd73ef4470596b33fc2c1ceb304566b99c71a69 --hash=sha256:6ca2b85a5997dabc38301a22ee43c82adcb53ff660b89ee88dded6b33687e1d8 --hash=sha256:db250fd3e90117e0312b611574cd1b3f78bec046783195075cbd7ba9c3d73f16 --hash=sha256:8b7bb4b9280da3b2856cb1fc425932f46fba609819ee1c62256f61799e6a51d2 --hash=sha256:c5bf0e132acf7557fc9bb8ded8b53bbbbea8892f3c9a1738205878ca9434206a --hash=sha256:55b745fca0a5ab738647d0e4db099bd0a23279c32b31a783ad2ccea729e632df --hash=sha256:637d827248f447e63585ca3f4a7d2dfaa882e094df6cfa177cc9cf9cd6cdf6d2 --hash=sha256:a9c65473ebc342715cb2d7926ff1e202c26376c0dcaaee85a1fd4b8d8c1d3b2f --hash=sha256:5d050e1e4bc9ddb8656d7b4f414557720ddcca23a5b88dd7cff65e847864c400 --hash=sha256:f39a995e47cb8649673cfa0579fbdd1cdd33ea497d1728a6cb194d6252268e48 --hash=sha256:1676b0a292dd3c99e49305a16d7a9f42a4ab60ec522eac0d3dd20cdf362ac010 --hash=sha256:67d44acb72c31a97a3d5d33d103ab06d8ac20770e1c5ad81bdb3f0c086a56cf6 --hash=sha256:66fbc6fed94a13b9801fb70b96ff30605ab0a123e775a5e7a26938b717c5d71a --hash=sha256:70eb5808127284c4e5c9e836208e09d685a7978b6a216db85960b1a112eeace8 --hash=sha256:4e465afc3b96dbc80cf4a5273e5e2b1e3451286361b4af70ce1adb2984d392f9 --hash=sha256:6e51534e78d14b4a009a062641f465cfaba4fdcb046c3ac0b1f61dd97c861b1b! Will try again.
Looking in indexes: https://pypi.python.org/simple
Ignoring pywin32: markers 'platform_system == "Windows"' don't match your environment
Installing initially failed dependencies...
[InstallError]: File "/usr/local/lib/python3.10/site-packages/pipenv/cli/command.py", line 233, in install
[InstallError]: retcode = do_install(
[InstallError]: File "/usr/local/lib/python3.10/site-packages/pipenv/core.py", line 2052, in do_install
[InstallError]: do_init(
[InstallError]: File "/usr/local/lib/python3.10/site-packages/pipenv/core.py", line 1304, in do_init
[InstallError]: do_install_dependencies(
[InstallError]: File "/usr/local/lib/python3.10/site-packages/pipenv/core.py", line 899, in do_install_dependencies
[InstallError]: batch_install(
[InstallError]: File "/usr/local/lib/python3.10/site-packages/pipenv/core.py", line 796, in batch_install
[InstallError]: _cleanup_procs(procs, failed_deps_queue, retry=retry)
[InstallError]: File "/usr/local/lib/python3.10/site-packages/pipenv/core.py", line 703, in _cleanup_procs
[InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: Looking in indexes: https://pypi.python.org/simple
[pipenv.exceptions.InstallError]: Collecting numpy==1.20.3
[pipenv.exceptions.InstallError]: Using cached numpy-1.20.3.zip (7.8 MB)
[pipenv.exceptions.InstallError]: Building wheels for collected packages: numpy
[pipenv.exceptions.InstallError]: Building wheel for numpy (setup.py): started
[pipenv.exceptions.InstallError]: Building wheel for numpy (setup.py): finished with status 'error'
[pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1:
[pipenv.exceptions.InstallError]: command: /root/.local/share/virtualenvs/build-3vGKWv3F/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py'"'"'; file='"'"'/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-bv_4pi7m
[pipenv.exceptions.InstallError]: cwd: /tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/
[pipenv.exceptions.InstallError]: Complete output (34 lines):
[pipenv.exceptions.InstallError]: /tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py:66: RuntimeWarning: NumPy 1.20.3 may not yet support Python 3.10.
[pipenv.exceptions.InstallError]: warnings.warn(
[pipenv.exceptions.InstallError]: Running from numpy source directory.
[pipenv.exceptions.InstallError]: Cythonizing sources
[pipenv.exceptions.InstallError]: Processing numpy/random/_bounded_integers.pxd.in
[pipenv.exceptions.InstallError]: Processing numpy/random/bit_generator.pyx
[pipenv.exceptions.InstallError]: Traceback (most recent call last):
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 59, in process_pyx
[pipenv.exceptions.InstallError]: from Cython.Compiler.Version import version as cython_version
[pipenv.exceptions.InstallError]: ModuleNotFoundError: No module named 'Cython'
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: During handling of the above exception, another exception occurred:
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: Traceback (most recent call last):
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 235, in
[pipenv.exceptions.InstallError]: main()
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 231, in main
[pipenv.exceptions.InstallError]: find_process_files(root_dir)
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 222, in find_process_files
[pipenv.exceptions.InstallError]: process(root_dir, fromfile, tofile, function, hash_db)
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 188, in process
[pipenv.exceptions.InstallError]: processor_function(fromfile, tofile)
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 64, in process_pyx
[pipenv.exceptions.InstallError]: raise OSError('Cython needs to be installed in Python as a module')
[pipenv.exceptions.InstallError]: OSError: Cython needs to be installed in Python as a module
[pipenv.exceptions.InstallError]: Traceback (most recent call last):
[pipenv.exceptions.InstallError]: File "", line 1, in
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py", line 513, in
[pipenv.exceptions.InstallError]: setup_package()
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py", line 493, in setup_package
[pipenv.exceptions.InstallError]: generate_cython()
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py", line 290, in generate_cython
[pipenv.exceptions.InstallError]: raise RuntimeError("Running cythonize failed!")
[pipenv.exceptions.InstallError]: RuntimeError: Running cythonize failed!
[pipenv.exceptions.InstallError]: ----------------------------------------
[pipenv.exceptions.InstallError]: ERROR: Failed building wheel for numpy
[pipenv.exceptions.InstallError]: Running setup.py clean for numpy
[pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1:
[pipenv.exceptions.InstallError]: command: /root/.local/share/virtualenvs/build-3vGKWv3F/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py'"'"'; file='"'"'/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' clean --all
[pipenv.exceptions.InstallError]: cwd: /tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad
[pipenv.exceptions.InstallError]: Complete output (12 lines):
[pipenv.exceptions.InstallError]: /tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py:66: RuntimeWarning: NumPy 1.20.3 may not yet support Python 3.10.
[pipenv.exceptions.InstallError]: warnings.warn(
[pipenv.exceptions.InstallError]: Running from numpy source directory.
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: setup.py clean
is not supported, use one of the following instead:
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: - git clean -xdf
(cleans all files)
[pipenv.exceptions.InstallError]: - git clean -Xdf
(cleans all versioned files, doesn't touch
[pipenv.exceptions.InstallError]: files that aren't checked into the git repo)
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: Add --force
to your command to use it anyway if you must (unsupported).
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: ----------------------------------------
[pipenv.exceptions.InstallError]: ERROR: Failed cleaning build dir for numpy
[pipenv.exceptions.InstallError]: Failed to build numpy
[pipenv.exceptions.InstallError]: Installing collected packages: numpy
[pipenv.exceptions.InstallError]: Running setup.py install for numpy: started
[pipenv.exceptions.InstallError]: Running setup.py install for numpy: finished with status 'error'
[pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1:
[pipenv.exceptions.InstallError]: command: /root/.local/share/virtualenvs/build-3vGKWv3F/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py'"'"'; file='"'"'/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-a7kgpscs/install-record.txt --single-version-externally-managed --compile --install-headers /root/.local/share/virtualenvs/build-3vGKWv3F/include/site/python3.10/numpy
[pipenv.exceptions.InstallError]: cwd: /tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/
[pipenv.exceptions.InstallError]: Complete output (43 lines):
[pipenv.exceptions.InstallError]: /tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py:66: RuntimeWarning: NumPy 1.20.3 may not yet support Python 3.10.
[pipenv.exceptions.InstallError]: warnings.warn(
[pipenv.exceptions.InstallError]: Running from numpy source directory.
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: Note: if you need reliable uninstall behavior, then install
[pipenv.exceptions.InstallError]: with pip instead of using setup.py install
:
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: - pip install .
(from a git repo or downloaded source
[pipenv.exceptions.InstallError]: release)
[pipenv.exceptions.InstallError]: - pip install numpy
(last NumPy release on PyPi)
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: Cythonizing sources
[pipenv.exceptions.InstallError]: numpy/random/_bounded_integers.pxd.in has not changed
[pipenv.exceptions.InstallError]: Processing numpy/random/bit_generator.pyx
[pipenv.exceptions.InstallError]: Traceback (most recent call last):
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 59, in process_pyx
[pipenv.exceptions.InstallError]: from Cython.Compiler.Version import version as cython_version
[pipenv.exceptions.InstallError]: ModuleNotFoundError: No module named 'Cython'
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: During handling of the above exception, another exception occurred:
[pipenv.exceptions.InstallError]:
[pipenv.exceptions.InstallError]: Traceback (most recent call last):
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 235, in
[pipenv.exceptions.InstallError]: main()
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 231, in main
[pipenv.exceptions.InstallError]: find_process_files(root_dir)
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 222, in find_process_files
[pipenv.exceptions.InstallError]: process(root_dir, fromfile, tofile, function, hash_db)
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 188, in process
[pipenv.exceptions.InstallError]: processor_function(fromfile, tofile)
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/tools/cythonize.py", line 64, in process_pyx
[pipenv.exceptions.InstallError]: raise OSError('Cython needs to be installed in Python as a module')
[pipenv.exceptions.InstallError]: OSError: Cython needs to be installed in Python as a module
[pipenv.exceptions.InstallError]: Traceback (most recent call last):
[pipenv.exceptions.InstallError]: File "", line 1, in
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py", line 513, in
[pipenv.exceptions.InstallError]: setup_package()
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py", line 493, in setup_package
[pipenv.exceptions.InstallError]: generate_cython()
[pipenv.exceptions.InstallError]: File "/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py", line 290, in generate_cython
[pipenv.exceptions.InstallError]: raise RuntimeError("Running cythonize failed!")
[pipenv.exceptions.InstallError]: RuntimeError: Running cythonize failed!
[pipenv.exceptions.InstallError]: ----------------------------------------
[pipenv.exceptions.InstallError]: ERROR: Command errored out with exit status 1: /root/.local/share/virtualenvs/build-3vGKWv3F/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py'"'"'; file='"'"'/tmp/pip-install-33lxl0_u/numpy_a536105d9e744fad8619f05a8720faad/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-a7kgpscs/install-record.txt --single-version-externally-managed --compile --install-headers /root/.local/share/virtualenvs/build-3vGKWv3F/include/site/python3.10/numpy Check the logs for full command output.
ERROR: Couldn't install package: numpy