Errors: (summary, details below)
Anaconda installer says that install failed, but won't show the details.
When I try to reinstall, it says Anaconda is already installed into ~/opt/anaconda3, which it is there
python -> import numpy -> Symbol not found: ___addtf3
Environment:
iMac, macOS Catalina 10.15.2
I did do the conda init bash and it seemed to work when I opened a new terminal tab
which python -> opt/anaconda3/bin/python
echo $DYLD_LIBRARY_PATH -> /opt/subversion/lib:/usr/lib:
Oddly in the errors below it's referencing files in /usr/local/lib/python3.7/site-packages/numpy/... but as I said, when I run Python, it starts off with the correct python in ~/opt/anaconda3/bin version, so I don't think it should be looking at /usr/local/lib at all should it??
Full Errors from import numpy:
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/numpy/core/__init__.py", line 24, in <module>
from . import multiarray
File "/usr/local/lib/python3.7/site-packages/numpy/core/multiarray.py", line 14, in <module>
from . import overrides
File "/usr/local/lib/python3.7/site-packages/numpy/core/overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ImportError: dlopen(/usr/local/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so, 2): Symbol not found: ___addtf3
Referenced from: /usr/local/lib/python3.7/site-packages/numpy/core/../.dylibs/libquadmath.0.dylib
Expected in: /usr/lib/libSystem.B.dylib
in /usr/local/lib/python3.7/site-packages/numpy/core/../.dylibs/libquadmath.0.dylib
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/site-packages/numpy/__init__.py", line 142, in <module>
from . import core
File "/usr/local/lib/python3.7/site-packages/numpy/core/__init__.py", line 54, 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.7 from "/usr/local/opt/python/bin/python3.7",
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy version "1.18.1" 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: dlopen(/usr/local/lib/python3.7/site-packages/numpy/core/_multiarray_umath.cpython-37m-darwin.so, 2): Symbol not found: ___addtf3
Referenced from: /usr/local/lib/python3.7/site-packages/numpy/core/../.dylibs/libquadmath.0.dylib
Expected in: /usr/lib/libSystem.B.dylib
in /usr/local/lib/python3.7/site-packages/numpy/core/../.dylibs/libquadmath.0.dylib
Related
The thing is that when updating anaconda, the program made in Python no longer starts, then I leave the error.
The procedure that I have followed has been to make a copy of the Anaconda3 folder that I had installed, delete the Anaconda3 folder, install the new Anaconda3.
From the previous copy I took the Lib from the previous Anaconda3 and pasted it into the new one, and this is the error that appears.
Error:
D:\Anaconda3\lib\site-packages\numpy\__init__.py:143: 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
ImportError: numpy.core.multiarray failed to import
Traceback (most recent call last):
File "D:\xampp\htdocs\RackManagement\app.py", line 3, in <module>
from apps.GT01.gt01 import app_gt01
File "D:\xampp\htdocs\RackManagement\apps\GT01\gt01.py", line 2, in <module>
from modules.db import getCodigos
File "D:\xampp\htdocs\RackManagement\modules\__init__.py", line 1, in <module>
from .tagColor import matchColor
File "D:\xampp\htdocs\RackManagement\modules\tagColor.py", line 1, in <module>
import cv2
File "D:\Anaconda3\lib\cv2\__init__.py", line 8, in <module>
from .cv2 import *
ImportError: numpy.core.multiarray failed to import
Well, I know that one of the ways to fix this would be to do a pip install or download the packages from anaconda, but on the server where this application is, it does not have access to the internet) that is, it is behind a firewall which only allows access to the application, that is to say for the server there is no internet and you cannot connect to download it.
As I have already said, the tests I did was to copy the folders from the old installation to the new one, but it still does not work
I am trying to install the following package in my MacOS High Sierra 10.13.6:
https://github.com/Michalychforever/CLASS-PT
When i run the make file everything looks to work fine. It not only generate an executable, which i can run by terminal using the ./ command, but also a python wrapper. The problem is related only with the former.
When i try to import the library i get the following message:
import classy
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: dlopen(/Users/thiagomergulhao/Library/Python/2.7/lib/python/site-packages/classy.so, 2): Symbol not found: _zdotu_
Referenced from: /Users/thiagomergulhao/Library/Python/2.7/lib/python/site-packages/classy.so
Expected in: flat namespace
in /Users/thiagomergulhao/Library/Python/2.7/lib/python/site-packages/classy.so
I am using the built-in python version (i.e 2.7.10). I already installed the Xcode 10.1 together with command line commands. My .bash_profile is:
export PATH="/Users/thiagomergulhao/Library/Python/2.7/bin:$PATH"
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
Does anyone have any ideia what is causing this problem?
I am trying to use NumPy in Python. I have just installed Anaconda Python 3.7, and that all seemed to go smoothly. However, I cannot import numpy(using the line import numpy). When I do, I get the following error:
C:\Users\jsmith\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 "C:\Users\jsmith\anaconda3\lib\site-packages\numpy\core\__init__.py", line 24, in <module>
from . import multiarray
File "C:\Users\jsmith\anaconda3\lib\site-packages\numpy\core\multiarray.py", line 14, in <module>
from . import overrides
File "C:\Users\jsmith\anaconda3\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
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 "<stdin>", line 1, in <module>
File "C:\Users\jsmith\anaconda3\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "C:\Users\jsmith\anaconda3\lib\site-packages\numpy\core\__init__.py", line 54, 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.7 from "C:\Users\jsmith\anaconda3\python.exe",
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy version "1.18.1" 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: The specified module could not be found.
I can see it in the Enviorments tab of Anaconda Navigator, and when I try to use it in Eclipse(Pydev) it shows up under forced builtins. I took a look at my PYTHONPATH, and both my enviorment in Eclipse and my base python directory (jsmith/anaconda3) are in it. I have tried importing other libraries I see under forced builtins,and those work fine, yet numpy seems to be the only one with issues. Calling pip install numpy tells me it is already installed with version 1.18.1. I looked at this stack overflow page, and ran the first command in the answer(conda create -n test numpy python=3.7 --no-default-packages) in anaconda prompt. This worked, and then I realized the test was specific to the question, and tried base instead, and got this error:
CondaValueError: The target prefix is the base prefix. Aborting.
However calling conda activate base did nothing.
As mentioned in the comments by #cel uninstalling and reinstalling numpy using pip uninstall numpy and pip install numpy made it work.
I better way is to
import os
import sys
os.path.dirname(sys.executable)
This will give you the path to your environment. Put the path into the settings for python
Open the Anaconda Prompt:
Then, you have to go to the Conda Environment that you want to use in PowerBI. Am having an environment 'temp', so I activate it first in the 'Anaconda Prompt':
(base) C:\Users\ashish>conda activate temp
Then I go to the directory having the "PowerBI" executable file in the installation folder:
(temp) C:\Users\ashish>cd "C:\Program Files\Microsoft Power BI Desktop\bin"
Then, I launch PowerBI from the Prompt:
(temp) C:\Program Files\Microsoft Power BI Desktop\bin>PBIDesktop.exe
This fixes the NumPy error you are getting. If you want any other package to use with PowerBI, install that package in the respective "Conda Environment" (in my case it is "temp").
Make sure the Python home directory (Anaconda3) has been added to the 'Power BI Desktop' global options in the Python scripting section too.
When I use Anaconda, importing numpy gives me the following error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File"C:\Users\s140041\Anaconda3\envs\testenv\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import add_newdocs
File"C:\Users\s140041\Anaconda3\envs\testenv\lib\site-packages\numpy\add_newdocs.py", line 13, in <module>
from numpy.lib import add_newdoc
File "C:\Users\s140041\Anaconda3\envs\testenv\lib\site-packages\numpy\lib\__init__.py", line 8, in <module>
from .type_check import *
File"C:\Users\s140041\Anaconda3\envs\testenv\lib\site-packages\numpy\lib\type_check.py", line 11, in <module>
import numpy.core.numeric as _nx
File"C:\Users\s140041\Anaconda3\envs\testenv\lib\site-packages\numpy\core\__init__.py", line 26, in <module>
raise ImportError(msg)
ImportError:
Importing the multiarray numpy extension module failed. Most
likely you are trying to import a failed build of numpy.
If you're working with a numpy git repo, try `git clean -xdf` (removes all
files not under version control). Otherwise reinstall numpy.
Original error was: DLL load failed: The specified module could not be found.
I have already done a LOT of troubleshooting:
I do not think the issue is path-related, Since Anaconda is my only installation of python on this machine, and the problem persists after a fresh installation of windows. I have not added anaconda to Path right now, since I just use the Anaconda prompt for all my conda related commands.
I do not think it is a problem with the environments, Problem exists on base/root environment of conda as well as on a new conda environment.
Problem is not system-related, was able to reproduce it on 2 seperate systems with specified version.
Problem is not PyCharm related, running python.exe from the root folder also gives the same error.
Uninstalling / reinstalling through conda doesn't work.
Conda does seem to look in the right library for the packages, checked this through print(sys.path) in python.exe, it returns the local library of anaconda where all it's default packages are installed.
Only when I uninstall using conda and re-install using pip everything works fine... Am i doing something wrong here, or is conda broken in this installation of Anaconda?
I just switched from a normal python/venv/pip to Anaconda/conda/environments, but I must say this is not really a warm welcome... Even though I heard that the conda packagement system is better than pip/venv.
UPDATE:
I filed a bug report on github, which can be found here.
https://github.com/conda/conda/issues/7833
Very clear discussion of what went wrong can be found in the bug-report on GitHub:
https://github.com/conda/conda/issues/7833
Summarized, using PyCharm with an unactivated environment is unsupported. So either use anaconda prompt, activate your environment and launch PyCharm from there, or re-install anaconda/mini-conda with the option "add-to-path" checked
I forked the scikit-learn repository, added a file that I need and downloaded the repository. I am not sure how to use this custom library. I cd'ed to the scikit-learn-master folder and tried to use it but it throws errors. So after reading the errors I installed it using python3 setup.py install. There were two setup.py files. One in the scikit-learn-master folder and sklearn folder so I ran python3 setup.py install at both these locations. They threw some warnings but no errors. I opened the python terminal in the scikit-learn-master folder and used import sklearn which returns the following -
Traceback (most recent call last):
File "/Users/shubhamgandhi/Desktop/scikit-learn-master/sklearn/__check_build/__init__.py", line 44, in <module>
from ._check_build import check_build # noqa
ModuleNotFoundError: No module named 'sklearn.__check_build._check_build'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/shubhamgandhi/Desktop/scikit-learn-master/sklearn/__init__.py", line 128, in <module>
from . import __check_build
File "/Users/shubhamgandhi/Desktop/scikit-learn-master/sklearn/__check_build/__init__.py", line 46, in <module>
raise_build_error(e)
File "/Users/shubhamgandhi/Desktop/scikit-learn-master/sklearn/__check_build/__init__.py", line 41, in raise_build_error
%s""" % (e, local_dir, ''.join(dir_content).strip(), msg))
ImportError: No module named 'sklearn.__check_build._check_build'
___________________________________________________________________________
Contents of /Users/shubhamgandhi/Desktop/scikit-learn-master/sklearn/__check_build:
__init__.py __pycache__ _check_build.c
_check_build.pyx setup.py setup.pyc
___________________________________________________________________________
It seems that scikit-learn has not been built correctly.
If you have installed scikit-learn from source, please do not forget
to build the package before using it: run `python setup.py install` or
`make` in the source directory.
If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.
I am not sure how to proceed. Is there anything I am missing?
It appears the module has not been built correctly. And so it shows importError for check_build.
Before installing the module using pip, make sure you have installed all of the dependencies. On the README file, the mentioned packages are:
Python (>= 2.7 or >= 3.3)
NumPy (>= 1.8.2)
SciPy (>= 0.13.3)
For running the examples Matplotlib >= 1.1.1 is required.
If you are not planning on contributing to the project, but only using it, it is recommended that you download from https://pypi.python.org/pypi/scikit-learn instead of forking it.
View detailed instructions on how to install here.
After installing and building this way, if you still have issues, you can refer http://scikit-learn.org/stable/faq.html for FAQs.