GH_CPython icon indicating copy to clipboard operation
GH_CPython copied to clipboard

Python (SPYDER) Import modules

Open loooo94 opened this issue 4 years ago • 3 comments

Hi, I've just tried to import numpy or matplotlib in grasshopper with GH_CPython. I have Spyder 3 (ANACONDA), Python standalone, Microsoft Visual studio. My operating system is Windows 10.

It gives me a long errors messages and gives me some advise like:

  1. D:\anaconda3\lib\site-packages\numpy_init_.py:140: UserWarning: mkl-service package failed to import, therefore Intel(R) MKL initialization ensuring its correct out-of-the box operation under condition when Gnu OpenMP had already been loaded by Python process is not assured. Please install mkl-service package, see http://github.com/IntelPython/mkl-service "

from . import distributor_init Traceback (most recent call last): File "D:\anaconda3\lib\site-packages\numpy\core_init.py", line 24, in from . import multiarray File "D:\anaconda3\lib\site-packages\numpy\core\multiarray.py", line 14, in from . import overrides File "D:\anaconda3\lib\site-packages\numpy\core\overrides.py", line 7, in from numpy.core._multiarray_umath import ( ImportError: DLL load failed: The specified module could not be found.

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "C:\GH_CPython\PythonFileWritten_6.py", line 24, in import numpy as np File "D:\anaconda3\lib\site-packages\numpy_init_.py", line 142, in from . import core File "D:\anaconda3\lib\site-packages\numpy\core_init_.py", line 54, in raise ImportError(msg) ImportError:

"

So, I don't knwo how can I figure out this issue! My goal is be able to use the whole python libraries on Grasshopper.

Thanks!

loooo94 avatar Jun 17 '20 14:06 loooo94

Hi @loooo94 , Are you able to import numpy and matplotlib using D:\anaconda3\Python.exe ?

MahmoudAbdelRahman avatar Jun 17 '20 14:06 MahmoudAbdelRahman

Yes I use it in Anaconda3. Maybe should be this: mkl-service but I don't understand where I need to check for this.

loooo94 avatar Jun 17 '20 20:06 loooo94

Hi, is this resolved yet? I had a similar problem when trying to use the interpreter from a conda environment. Seems like the environment's interpreter was used but outside the environment.

Is there a way to run GH_CPython within a specific environment?

chirth avatar Nov 10 '21 20:11 chirth