Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install is throwing "ModuleNotFoundError: No module named 'numpy'" error even though numpy is installed #5

Open
Melton-Elizabeth opened this issue Apr 30, 2023 · 2 comments

Comments

@Melton-Elizabeth
Copy link

Hello,

I'm trying to install pyimfit on my Windows 10 machine through Anaconda. Even though I have updated my current version on numpy, running the command:

pip install pyimfit --use-pep517

Gives me following output:

Collecting pyimfit
Using cached pyimfit-0.12.0.tar.gz (10.7 MB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status 'error'
Note: you may need to restart the kernel to use updated packages.
error: subprocess-exited-with-error

Getting requirements to build wheel did not run successfully.
exit code: 1

[17 lines of output]
Traceback (most recent call last):
File "C:\Users*\AppData\Roaming\Python\Python39\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "C:\Users*
\AppData\Roaming\Python\Python39\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main
json_out['return_val'] = hook(hook_input['kwargs'])
File "C:\Users*
\AppData\Roaming\Python\Python39\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "C:\Users*\AppData\Local\Temp\pip-build-env-zbj5j6jk\overlay\Lib\site-packages\setuptools\build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
File "C:\Users*
\AppData\Local\Temp\pip-build-env-zbj5j6jk\overlay\Lib\site-packages\setuptools\build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "C:\Users*\AppData\Local\Temp\pip-build-env-zbj5j6jk\overlay\Lib\site-packages\setuptools\build_meta.py", line 487, in run_setup
super(_BuildMetaLegacyBackend,
File "C:\Users*
\AppData\Local\Temp\pip-build-env-zbj5j6jk\overlay\Lib\site-packages\setuptools\build_meta.py", line 338, in run_setup
exec(code, locals())
File "", line 25, in
ModuleNotFoundError: No module named 'numpy'
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

Getting requirements to build wheel did not run successfully.
exit code: 1

@perwin
Copy link
Owner

perwin commented Apr 30, 2023

Hi,

I'm not sure I can help very much, as I don't have access to a Windows machine and so have never tried developing Imfit or PyImfit on Windows. (I also don't use Anaconda Python very much, but that's probably less of an issue.)

It sounds as if there's a problem finding the numpy library (even though it's installed). You might try searching online to see if anyone else has similar problems (e.g., trying to compile a Python library for use on Windows 10 with Anaconda), even if it's for libraries that have nothing to do with Imfit.

@perwin
Copy link
Owner

perwin commented Apr 27, 2024

It turns out I get a similar problem when trying to install pyimfit for continuous-integration testing using Github Actions. The problem seems to be related to recent versions of pip; a workaround is to specify an older version of pip:

python -m pip install --upgrade pip==22.3.1

before running pip install pyimfit.

(You can then probably restore the latest version of pip by doing python -m pip install --upgrade pip after you've installed pyimfit.)

(This may not work with Python 3.12, since that breaks older versions of pip.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants