Skip to main content

Installing new version of numpy in python env

Comments

3 comments

  • cPanelThomas
    Without knowing what python version and pip version is in use here for your attempt to install numpy
    , any advice I give will be about as useful as telling you to consult a search engine for this error message. There's quite a few ways installing wheels can go wrong during a pip install, almost every one of them having nothing really to do with cPanel & WHM, as we provide no specific tools to manage python environments for users. If I had to guess, there's a python version -> numpy version compatibility issue here (as that's usually the issue), but as I said earlier, this advice is likely no better than you'd find just by consulting a search engine about this error. I wish you the best of luck in resolving this issue regardless.
    0
  • Ajay poly
    Without knowing what python version and pip version is in use here for your attempt to install numpy
    , any advice I give will be about as useful as telling you to consult a search engine for this error message. There's quite a few ways installing wheels can go wrong during a pip install, almost every one of them having nothing really to do with cPanel & WHM, as we provide no specific tools to manage python environments for users. If I had to guess, there's a python version -> numpy version compatibility issue here (as that's usually the issue), but as I said earlier, this advice is likely no better than you'd find just by consulting a search engine about this error. I wish you the best of luck in resolving this issue regardless.

    I am using Python version 3.11.4, and the current version of pip is 23.2.1. I'm trying to install the latest version of numpy, which is 1.25.2. However, I'm encountering the same error repeatedly. Here's an extended error message that I've posted for reference: IndexError: list index out of range INFO: ########### CLIB COMPILER OPTIMIZATION ########### INFO: Platform : Architecture: x64 Compiler : gcc CPU baseline : Requested : 'min' Enabled : SSE SSE2 SSE3 Flags : -msse -msse2 -msse3 Extra checks: none CPU dispatch : Requested : 'max -xop -fma4' Enabled : SSSE3 SSE41 POPCNT SSE42 AVX F16C Generated : none INFO: CCompilerOpt.cache_flush[863] : write cache to path -> /tmp/pip-install-u35ip1ut/numpy_accd5e005c864c8d9072324859322fab/build/temp.linux-x86_64-3.11/ccompiler_opt_cache_clib.py [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects. In an attempt to resolve the issue, I downgraded Python to version 3.8.16 and successfully installed numpy version 1.21.6. However, I still require the latest version of numpy (1.25.2) to run my application. When I tried to install numpy 1.25.2, I encountered the following error: import numpy.distutils.command.sdist Cythonizing sources Traceback (most recent call last): File "/home/rbxc20t22taa/virtualenv/demo1/3.8/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in main() File "/home/rbxc20t22taa/virtualenv/demo1/3.8/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main json_out['return_val'> = hook(**hook_input['kwargs'>) File "/home/rbxc20t22taa/virtualenv/demo1/3.8/lib/python3.8/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 251, in build_wheel return _build_backend().build_wheel(wheel_directory, config_settings, File "/tmp/pip-build-env-bgw0j7tg/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 230, in build_wheel return self._build_with_temp_dir(['bdist_wheel'>, '.whl', File "/tmp/pip-build-env-bgw0j7tg/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 215, in _build_with_temp_dir self.run_setup() File "/tmp/pip-build-env-bgw0j7tg/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 267, in run_setup super(_BuildMetaLegacyBackend, File "/tmp/pip-build-env-bgw0j7tg/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 158, in run_setup exec(compile(code, __file__, 'exec'), locals()) File "setup.py", line 479, in setup_package() File "setup.py", line 458, in setup_package generate_cython() File "setup.py", line 261, in generate_cython raise RuntimeError("Running cythonize failed!") RuntimeError: Running cythonize failed! [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for numpy Failed to build numpy ERROR: Could not build wheels for numpy, which is required to install pyproject.toml-based projects. These errors seem to originate from subprocesses and may not be directly related to pip. Any assistance in resolving this issue would be greatly appreciated.
    0
  • cPanelThomas
    I notice in the output there that you are running as what appears to be an unprivileged user. The C compiler access may be disabled in that context on cPanel & WHM systems. Have you tried installing this python dependency with the `--no-binary` option so that it skips trying to install/compile the wheel? If this is being brought in by a requirements.txt file this could also help:
    0

Please sign in to leave a comment.