I want to install scipy packages and I know it's a repetitive question, but I have tried all of them but I didn't find a proper solution.
when write this : import scipy
it executes successfully. but when I try this:
import scipy.spatial
I receive this message:
Traceback (most recent call last):
File "C:/Users/Hamid/Documents/kodeyaro/kodefolani.py", line 41, in <module>
from scipy.spatial import Delaunay
File "C:\Python27\lib\site-packages\scipy\spatial\__init__.py", line 92, in module>
from .qhull import *
ImportError: DLL load failed: The specified module could not be found.
what should I do?
below re-installation will fix the issue as required dll will be placed at right place.
user should have admin permissions on the system.
python -m pip install scipy --upgrade --force
I faced this problem when I switched to python38. Build was failing while scipy installation.
I solved by using prebuilt libs from Prof: Gohlke
https://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
Install appropriate numpy+mkl version using --force argument
pip install numpy-1.17.3+mkl-cp38-cp38-win_amd64.whl --force
Run this in the cmd:
pip install scipy
It is advisable to run cmd as Adminstrator.
Related
I am running Windows 10, and I have Python installed.
When trying to run a Python program with the line from sklearn.cluster import DBSCAN in it, I get the following error:
File "C:\Users\User\AppData\Local\Programs\Python\Python310\lib\site-packages\sklearn\metrics\pairwise.py", line 33, in <module>
from ._pairwise_distances_reduction import PairwiseDistancesArgKmin
ImportError: DLL load failed while importing _pairwise_distances_reduction: The specified module could not be found.
I have tried solving this by entering each of these in the command line (separately, not all at once) and checking whether or the program works:
pip install sklearn
pip install scikit-learn
pip uninstall scipy then pip install scipy
pip uninstall numpy then pip install numpy
I still get the same error when running the program. I'm having difficulty troubleshooting this, searching for "_pairwise_distances_reduction" returns no helpful results.
Is there something I'm supposed to install that I missed?
I was having this problem too, I installed Visual C++ Redistributable Runtimes libraries and it solved my problem.
when I installed the 'cvxopt-1.1.9-cp36-cp36m-win_amd64.whl',problems are always going on. I'm using the win7 system, anoconda with python3.6.1. The installation process was held by 'pip install cvxopt-1.1.9-cp36-cp36m-win_amd64.whl' on cmd window. (The path has been switched to the cvxopt-1.1.9-cp36-cp36m-win_amd64.whl'path). The cmd window shows 'Successfully installed cvxopt-1.1.9'
D:\APS>pip install cvxopt-1.1.9-cp36-cp36m-win_amd64.whl
Processing d:\aps\cvxopt-1.1.9-cp36-cp36m-win_amd64.whl
Installing collected packages: cvxopt
Successfully installed cvxopt-1.1.9
but When the program is executed, it is always reported wrong.
Traceback (most recent call last):
File "D:/python/cvx_opt/linear_program.py", line 1, in
from cvxopt import matrix, log, div, spdiag, solvers
File "C:\MySoftware\Anaconda3\lib\site-packages\cvxopt__init__.py", line 34, in
import cvxopt.base
ImportError: DLL load failed: 找不到指定的模块。
Could you please give me some valuable suggestions? Thank you very much, thank you. Any reply will be greatly appreciated.
The package CVXOPT requires numpy+mkl, so first uninstall the numpy package of anoconda and reinstall numpy+mkl from http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy,
then pip install numpy+mkl...whl
next,download cvxopt from
http://www.lfd.uci.edu/~gohlke/pythonlibs/#cvxopt
finally then pip install CVXOPT...whl
it will work.
After hours of trying I'm still not able to install numpy. I READ LOTS OF HINTS, ANSWERS USW. BUT IT DOESN'T HELP.
Furthermore I have windows 7, 32 bit, Python 27.
What I did:
download numpy-1.10.2.zip:
http://sourceforge.net/projects/numpy/files/
unzip it
start the windows command prompt and input:
cd C:\Users\myname\Desktop\numpy-1.10.2
now it appears:
C:\Users\myname\Desktop\numpy-1.10.2>
I input:
python setup.py install
and there appears an error:
Running from numpy source directory.
Traceback (most recent call last):
File "setup.py", line 263, in <module>
setup_package()
File "setup.py", line 246, in setup_pa
import setuptools
ImportError: No module named setuptools
I hope somebody can help me or even better IS THERE NOT EASIER WAY TO INSTALL NUMPY OR OTHER MODULES??
Building numpy from source on windows is non-trivial. Best use official binaries (http://sourceforge.net/projects/numpy/files/NumPy/1.10.2/) or Gohlke binaries (http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy) or a distribution like Anaconda or Canopy or WinPython.
You need to install the setuptools package as well. See here.
A more easy way to install python packages is using pip, which resolves package dependencies automatically. See here. Pip should be included in your python installation if you use a recent version.
You should succeed by calling pip install numpy.
I have installed (with lots of troubles) scikits.audiolab for making sounds out of data. Now when I type:
import scikits.audiolab I get the following error
>>> import scikits.audiolab
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/scikits.audiolab-0.11.0-py2.7-macosx-10.7-intel.egg/scikits/audiolab/__init__.py", line 25, in <module>
from pysndfile import formatinfo, sndfile
File "/Library/Python/2.7/site-packages/scikits.audiolab-0.11.0-py2.7-macosx-10.7-intel.egg/scikits/audiolab/pysndfile/__init__.py", line 1, in <module>
from _sndfile import Sndfile, Format, available_file_formats, \
File "numpy.pxd", line 30, in scikits.audiolab.pysndfile._sndfile (/private/tmp/easy_install-gKE3i5/scikits.audiolab-0.11.0/scikits/audiolab/pysndfile/_sndfile.c:9632)
ValueError: numpy.dtype does not appear to be the correct type object
How do I fix this?
Any alternative package that can do the job?
I had the same issue and for me it was caused by installing another (more recent) version of NumPy.
Check if you have different versions of NumPy installed and try switching back to an older one. For my part: I had a system-wide installation of Python and common modules like NumPy, which I couldn't touch because I'm not admin on that system. So when I installed some other library locally (in ~/.local/lib/python2.7/) it would also install more recent versions of SciPy and NumPy and put them into that local folder. And when importing the module it would draw from the local directory first before looking at the system-wide libraries which were working fine before with scikits.audiolab. So for me it was solved by
pip uninstall numy && pip uninstall scipy because that only deleted the newer local versions of numpy.
But more specific to your case, here is a tutorial how (on a Mac) to switch to a certain version of NumPy:
multiple numpy version on Mac OS X
The NumPy version I found working for my scikits.audiolab is 1.6.1
>>> import numpy
>>> numpy.version.version
'1.6.1'
Hope that helps. :)
Maybe you installed/upgraded numpy after installing talkbox. Try running this command:
pip install --upgrade --force-reinstall scikits.talkbox
As suggested here:
https://github.com/ppwwyyxx/speaker-recognition/issues/13
I tried to install statsmodels Python library on a Fedora 19 system. I used easy_install as follows:
easy_install -U statsmodels
But I get the following error while installing:
error: SandboxViolation: os.open('/root/.matplotlib/tmpvjSAwn', 131266, 384) {}
The package setup script has attempted to modify files on your system
that are not within the EasyInstall build area, and has been aborted.
This package cannot be safely installed by EasyInstall, and may not
support alternate installation locations even if you run its setup
script by hand. Please inform the package's author and the EasyInstall
maintainers to find out if a fix or workaround is available.
What's wrong here?
In the setup.py in source, add
os.environ["MPLCONFIGDIR"] = "."
after import os
Then I got the following error when I called the
python setup.py install
from the statsmodels directory.
Traceback (most recent call last):
File "setup.py", line 465, in <module>
check_dependency_versions(min_versions)
File "setup.py", line 124, in check_dependency_versions
raise ImportError("statsmodels requires patsy. http://patsy.readthedocs.org")
pasty was missing in the system. So only thing I had to do was installing pasty. using
easy_install --upgrade patsy
then I could install statsmodels from the source in the normal way.