MahmoudAbdelRahman / GH_CPython

CPython plugin for Rhino-Grasshopper
BSD 2-Clause "Simplified" License
175 stars 38 forks source link

Importing the numpy c-extensions failed #39

Closed protactinium91 closed 4 years ago

protactinium91 commented 4 years ago

Importing the numpy c-extensions failed. Strangely this works on my laptop, but on the PC I cannot solve this. I have anaconda python 3.6 installed with all the modules. These work in Jupyter Notebook for example, but not in GH.

1. Traceback (most recent call last):
  File "C:\Users\Mateusz\Anaconda3\envs\gh36\lib\site-packages\numpy\core\__init__.py", line 17, in <module>
    from . import multiarray
  File "C:\Users\Mateusz\Anaconda3\envs\gh36\lib\site-packages\numpy\core\multiarray.py", line 14, in <module>
    from . import overrides
  File "C:\Users\Mateusz\Anaconda3\envs\gh36\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
    from numpy.core._multiarray_umath import (
ImportError: DLL load failed: Nie można odnaleźć określonego modułu.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "C:\GH_CPython\PythonFileWritten_5.py", line 3, in <module>
    from sklearn.externals import joblib
  File "C:\Users\Mateusz\Anaconda3\envs\gh36\lib\site-packages\sklearn\__init__.py", line 74, in <module>
    from .base import clone
  File "C:\Users\Mateusz\Anaconda3\envs\gh36\lib\site-packages\sklearn\base.py", line 17, in <module>
    import numpy as np
  File "C:\Users\Mateusz\Anaconda3\envs\gh36\lib\site-packages\numpy\__init__.py", line 142, in <module>
    from . import core
  File "C:\Users\Mateusz\Anaconda3\envs\gh36\lib\site-packages\numpy\core\__init__.py", line 47, in <module>
    raise ImportError(msg)
ImportError: 

IMPORTANT: PLEASE READ THIS FOR ADVICE ON HOW TO SOLVE THIS ISSUE!

Importing the numpy c-extensions failed.
- Try uninstalling and reinstalling numpy.
- If you have already done that, then:
  1. Check that you expected to use Python3.6 from "C:\Users\Mateusz\Anaconda3\envs\gh36\python.exe",
     and that you have no directories in your PATH or PYTHONPATH that can
     interfere with the Python and numpy version "1.17.4" you're trying to use.
  2. If (1) looks fine, you can open a new issue at
     https://github.com/numpy/numpy/issues.  Please include details on:
     - how you installed Python
     - how you installed numpy
     - your operating system
     - whether or not you have multiple versions of Python installed
     - if you built from source, your compiler versions and ideally a build log

- If you're working with a numpy git repository, try `git clean -xdf`
  (removes all files not under version control) and rebuild numpy.

Note: this error has many possible causes, so please don't comment on
an existing issue about this - open a new one instead.

Original error was: DLL load failed: Nie można odnaleźć określonego modułu.
protactinium91 commented 4 years ago

Closing, as uninstalling and isntalling again the numpy package solved the issue

kastnerp commented 4 years ago

I am facing the same problem with Python 3.6. Could you tell me what exactly you were doing to fix this? Reinstalling with "--force" didn't help in my case.