Numpy ImportError

I have been trying to install numpy to run some code that was made by someone else. The issue I am having is that when I run the code a numpy Import Error is thrown telling me that I am missing required c files.

I am running the code in an anaconda env

  • Conda version 24.5.0
  • Python version 3.11
  • Numpy version 2.0.0
  • Numpy-base version 1.26.4
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.11 from "C:UsersVinr5anaconda3envsresearchpython.exe"
  * The NumPy version is: "2.0.0"

and make sure that they are the versions you expect.
Please carefully study the documentation linked above for further help.

Original error was: DLL load failed while importing _multiarray_umath: The paging file is too small for this operation to complete.

...

This is accompanied by a long error message which I will have to cut short to fit StackOverflow’s post requirements

Could not import runpy module
Fatal Python error: Could not import runpy module
init_import_siteException in Tkinter callback
init_import_siteFatal Python error: Could not import runpy module
Could not import runpy module
Could not import runpy module
Could not import runpy module
: : init_import_siteFatal Python error: Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Fatal Python error: Could not import runpy module
Traceback (most recent call last):
  File "<frozen importlib._bootstrap>", line 1176, in _find_and_load
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
  File "C:UsersVinr5anaconda3envsresearchLibsite-packagesnumpy_core__init__.py", line 23, in <module>
    from . import multiarray
  File "C:UsersVinr5anaconda3envsresearchLibsite-packagesnumpy_coremultiarray.py", line 10, in <module>
    from . import overrides
  File "C:UsersVinr5anaconda3envsresearchLibsite-packagesnumpy_coreoverrides.py", line 8, in <module>
    from numpy._core._multiarray_umath import (
ImportError: PyCapsule_Import could not import module "datetime"

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:UsersVinr5anaconda3envsresearchLibsite-packagesnumpy__init__.py", line 128, in <module>
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
    from numpy.__config__ import show as show_config
Traceback (most recent call last):
  File "C:UsersVinr5anaconda3envsresearchLibsite-packagesnumpy__config__.py", line 4, in <module>
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Could not import runpy module
Could not import runpy module
    from numpy._core._multiarray_umath import (
  File "<frozen runpy>", line 189, in _run_module_as_main
Could not import runpy module
  File "C:UsersVinr5anaconda3envsresearchLibsite-packagesnumpy_core__init__.py", line 49, in <module>
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Could not import runpy module
Could not import runpy module
Traceback (most recent call last):
    raise ImportError(msg)
  File "<frozen runpy>", line 189, in _run_module_as_main
  File "<frozen runpy>", line 189, in _run_module_as_main
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
Traceback (most recent call last):
  File "<frozen runpy>", line 189, in _run_module_as_main
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.11 from "C:UsersVinr5anaconda3envsresearchpython.exe"
  * The NumPy version is: "2.0.0"

Following the link in the error message I have done the following

  1. Verified that I have the correct numpy and python version installed
  2. Uninstalled and reinstalled numpy through conda install -c conda-forge numpy
  3. Uninstalled and reinstalled numpy through pip install numpy. Taking care that I have removed numpy from the environment before I pip install numpy.
  4. I have tried all of these on conda version 4.10, 4.14, 22.3, 24.5
  5. I have removed all other installations of python that aren’t the anaconda specific installation as well as their environment variable paths
  6. Building numpy from source following their directions failed on the final step because package metadata generation failed.

All of these things I have tried on two computers and have gotten the same results.

New contributor

Arye Oskotsky is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật