Importerror dll load failed не найден указанный модуль
Traceback (most recent call last):
File "D:/PearsonPick/get_func.py", line 3, in
import scipy.integrate as spint
File "C:\Python34\lib\site-packages\scipy\integrate\__init__.py", line 51, in
from .quadrature import *
File "C:\Python34\lib\site-packages\scipy\integrate\quadrature.py", line 6, in
from scipy.special.orthogonal import p_roots
File "C:\Python34\lib\site-packages\scipy\special\__init__.py", line 601, in
from ._ufuncs import *
ImportError: DLL load failed: Не найден указанный модуль.
я так понял, что он ругается на
версия scipy:
scipy-0.16.0b2-cp34-none-win32.whl
подскажите, в каком направлении хоть копать. никак не могу побороть это!
Подключение библиотеки Crypto. Если возможно, нужна ссылка на скачивание данной библиотеки
Возникли сложности с подключением библиотеки Crypto: import Crypto.Cipher.AES Выдает.
Отсутствие модуля pexpect
Здравствуйте, прошу помощи, значит есть у меня сервер, на Debian 8 x86, есть у меня скрипт .py .
Проверить наличие в строке 10 цифр и отсутствие знака «?»
Здравствуйте. Помогите, пожалуйста, написать регулярку (одной строкой), которая проверяет, что в.
Как проверить строку на отсутствие символов из множества?
Определить, содержит ли строка символы, отличные от букв и пробела напишите,пожалуйста,программу
Решение
druidich, на linux с такой проблемой не сталкивался, у меня через менеджер пакетов ставится без проблем.
Добавлено через 4 минуты
druidich, перед попытками установить я бы посоветовал удалить старую версию + попробовать поискать вручную остатки в папке интерпретатора (иногда бывает остаётся и не ставится новая версия добром). Но, если не знаешь, что удаляешь, лучше не трогать.
I'm setting up an autoclicker in Python 3.8 and I need win32api for GetAsyncKeyState but it always gives me this error:
I'm on Windows 10 Home 64x. I've already tried
And it successfully installs but nothing changes. I tried uninstalling and re-installing python as well. I also tried installing 'django' in the same way and it actually works when I import django , so I think it's a win32api issue only.
I expect the output to be none, but the actual output is always that error ^^
Make sure you don't have a dependency conflict! I installed pywin32 via pip and it conflicted with my Conda installation.
peterjc123 commented Mar 21, 2019
Patrikejane commented Oct 9, 2017
aviolov commented Feb 20, 2018
I get a similar error in the following context: Perviously, I successfully used windows10 pytorch 0.2.1 (using the anaconda distribution from -c peterjc123). We have now downloaded a pip .whl for all of us to use and so I uninstalled pytorch 0.2.1 and tried installing the wheel file using
pip install $PATH_TO_WHL$/torch-0.3.0b0+591e73e-cp36-cp36m-win_amd64.whl
This completes successfully, but then I get (in spyder, PyDev and python command line):
'>> import torch
Traceback (most recent call last):
File "C:\Users\alexandre\Anaconda3\lib\site-packages\torch_init_.py", line 76, in
from torch._C import *
ImportError: DLL load failed: The specified module could not be found.
'
I am on windows 10, python 3.6.4, conda 4.4.10. And pip is the anaconda pip.
As a fallback I tried:
conda install -c peterjc123 pytorch cuda80
and that 'worked'
But I am curious why the .whl file fails for me (it works on a colleague's machine).
nomisto commented Jan 23, 2020 •
I had the same problem of getting error "from torch._C import * ImportError: DLL load failed: The specified module could not be found."
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:06:47) [MSC v.1914 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>>
============== RESTART: C:\Program Files (x86)\Python37-32\1.py ==============
Traceback (most recent call last):
File "C:\Program Files (x86)\Python37-32\1.py", line 1, in
import cv2
ImportError: DLL load failed: Не найден указанный модуль.
Как открыть файл на питоне, чтобы внутри содержимый код работал при открытии на питоне?
Хочу открыть файл, чтобы внутри код работал на питоне: >>> a = open(r'F:\python\py\Madi.
Не импортируется модуль
При связывании двух таблиц через sqlalchemy не импортируется модуль Task. db.py: from.
Не импортируется модуль
Подскажите, пожалуйста, почему код не импортируется как модуль? def commas(N): .
Не импортируется свой же файл
Всем привет. Проект в PyCharm, в проекте два файла "main.py" "JobKate" если в JobKate сделать.
Это понятно, писать код можно хоть в блокноте, а исполнять код как тогда? не редактором ведь.. или я чего то не знаю?
Если нет - очевидно, что вы неверно(не в тот python - если их несколько, то легко ошибиться) установили.
Только что вот сам промахнулся и не в ту установку 3.7 установил его (у меня еще embedded версия в PATH).
Поэтому советую пользоваться командами установки через py.
Добрый день. Судя по выданному листингу, библиотека встала как надо, все совпадает строчка в строчку. Что делать если да? а библиотека не импортируется
Наберите в командной строке
py -3.7
и затем
Ну тут сказать нечего - не иначе как барабашка виноват :-)
Если серьезно, то попробовать переустановить, потому что каких-то явных причин для этой ошибки нет, а вот про неявные на чужом компе ничего не скажешь.
Да пробовал уже переустанавливать, и 64-битный ставил, и версию ниже, на 8 или 10 винде ребята проверяли все нормально ставится, но из-за этого не хочется ломать нормально работающую систему к которой уже привык. Может в реестре установщик где что какие пути прописывает.
pip не делает в реестре никаких записей. По сути whl архив, который качает pip, это просто zip файл - можно все распаковать и установить вручную.
Если проблема в вашей ОС, то мы вам ничем не можем помочь.
Ставил то же самое на 7 компов, там тоже винда7 и тот же баг, проблема может быть и в винде, но ошибка связана (DLL load failed: Не найден указанный модуль. ) с загрузкой dll -ки. В ошибке ссылка на 3 строку файла __init__.py из директории ..\cv2\
from .cv2 import *
если открыто это файл и исполнить вылазит ошибка:
Traceback (most recent call last):
File "C:\Program Files (x86)\Python37-32\Lib\site-packages\cv2\__init__.py", line 3, in
from .cv2 import *
ModuleNotFoundError: No module named '__main__.cv2'; '__main__' is not a package
Неужели винда 7 состарилась и opencv в принципе там терь не работает. Но ведь на одному ноуте работает, там раньше был питон2.7, я его деинсталлировал и поставил то же 3.7. все так же. Вопрос что не так?
Не надо это делать. Ошибка No module named '__main__ обычная и говорит, о том что человек ее вызвавший не разбирается в системе импорта python.
Python 2.7.10 (default, May 23 2015, 09:40:32) [MSC v.1500 32 bit (Intel)] on win32
Type "copyright", "credits" or "license()" for more information.
>>> import cv2
>>> print cv2.__version__
3.2.0
>>>
Не знаю почему работает. С 3 версией питона разбираюсь. Всем кто помогал спасибо. И я действительно не разбираюсь в системе импорта питон.
p.s. Винда 64х, установлены все обновления и библиотеки vc_redist.x64.exe и vc_redist.x86.exe
Не импортируется БД
Нашёл скрипт опросов в сети, скачал там был файл .sql зашёл в phpmyadmin, нажал импорт, настройки.
Не импортируется база
Всем привет! Не получается на локалке импортировать базу данных. Вылазит такая ошибка: .
Не импортируется база
Сайт на вордпрессе. Экспортирую с хоста БД и пытаюсь импортировать её в локалке - получаю такую.
Не импортируется таблица стилей
Господа, не импортируется таблица стилей. Не могу понять почему. Вот хтмл код <html> <head> .
Helenwyw commented Mar 21, 2019
aviolov commented Feb 21, 2018
I don't think this is a CUDA related issue. It sounds more like the pip install command messes up the torch folders 'somehow', as the other comments above suggest, although i experienced the problem not just when running python in the same folder in which I ran the pip comand. (pydev, spyder, ipython in another folder)
Also I did try
conda install pytorch
conda uninstall pytorch
pip instal pytorch.whl
And the failure persisted, which suggests that it's not related to the vc2017 Redist, since the first conda update should have fixed that?
Another weird thing is that when i try to pip uninstall I get an error that it cannot remove some folders from my AppData\Local\Temp. These folders look like the torch distriution (./torch/_nvrtc.cp.. etc).
genliu777 commented Jan 29, 2016
THANKS a lot first.
just code "import scipy.sparse.linalg" in pycharm, and get the error:
Traceback (most recent call last):
File "E:/pycharm/plot_hmm_stock_analysis/hmm_stock_analysis.py", line 18, in
import scipy.sparse.linalg
File "C:\Anaconda3_64\lib\site-packages\scipy\sparse\linalg__init__.py", line 109, in
from .isolve import *
File "C:\Anaconda3_64\lib\site-packages\scipy\sparse\linalg\isolve__init__.py", line 6, in
from .iterative import *
File "C:\Anaconda3_64\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 7, in
from . import _iterative
ImportError: DLL load failed: The specified module could not be found.
why? does it mean that scipy not properly set up!? if so, how to fix it? remove scipy and reinstall it again? i use anaconda for python is that i can not set up numpy or scipy by myself.
i remember not clearly that some samples of sklearn use scipy.sparse.linalg and i code it without any error.
srilalithaveerubhotla commented Nov 13, 2019
I get a similar error in the following context: Perviously, I successfully used windows10 pytorch 0.2.1 (using the anaconda distribution from -c peterjc123). We have now downloaded a pip .whl for all of us to use and so I uninstalled pytorch 0.2.1 and tried installing the wheel file using
pip install $PATH_TO_WHL$/torch-0.3.0b0+591e73e-cp36-cp36m-win_amd64.whl
This completes successfully, but then I get (in spyder, PyDev and python command line):
'>> import torch
Traceback (most recent call last):
File "C:\Users\alexandre\Anaconda3\lib\site-packages\torch__init__.py", line 76, in
from torch._C import *
ImportError: DLL load failed: The specified module could not be found.
'I am on windows 10, python 3.6.4, conda 4.4.10. And pip is the anaconda pip.
As a fallback I tried:
conda install -c peterjc123 pytorch cuda80
and that 'worked'But I am curious why the .whl file fails for me (it works on a colleague's machine).
aviolov commented Feb 22, 2018 •
@peterjc123, I think it does:
pwd
Out[11]: 'C:\Users\alexandre\Anaconda3'
glob.glob(r'./**/_nvrtc.cp*', recursive=True)
Out[10]:
['.\Lib\site-packages\torch\_nvrtc.cp36-win_amd64.pyd',
'.\pkgs\pytorch-0.3.0-py36_0.3.0cu80\Lib\site-packages\torch\_nvrtc.cp36-win_amd64.pyd']
This is after uninstalling the .whl file and installing via conda install -c .
yuzihao111 commented Mar 21, 2019
@peterjc123 Hello!I also meet the same problem.
windows 10 Anaconda python3.6.3
conda install pytorch-cpu torchvision-cpu -c pytorch
I tried the solution :conda install -c peterjc123 pytorch-cpu,it works.
BUT! The version of pytorch is 0.3.1 , it is not meet my needs. I suggest you could explain the version of pytorch.
I uninstall it, and reinstall by conda install pytorch-cpu torchvision-cpu c pytorch.
I tried several method this page mentioned.
Finally, this sloution works!
Download win-64/intel-openmp-2018.0.0-8.tar.bz2 and put the dll files in Library\bin into a dir and append the path of it to the environment variable PATH.
And reboot the windows!
Thank you!
HarshneetBhatia commented Jan 7, 2018 •
@peterjc123
Using Anaconda -Spyder python 3.6
I have installed conda install -c peterjc123 pytorch
I am using windows 8.1
Is space creates problem I have the same path hp i3 - Should I change the the name ?
superbobry commented Jan 29, 2016
Glad to help. Closing the issue.
rm17tink commented Jun 13, 2019
Not sure if anyone has solved this issue but windows 10, Python 3.7.1 installing from Spyder using the !pip install. CUDA was messing up that error message for me. So i deleted the files manually( uninstall) took forever and reinstalled the non-cuda version. Works fine now.
primakov commented Sep 2, 2019 •
I had the same problem on python: 3.7.3, cuda 10.1, pythorch 1.2.
For me uninstalling the package and installing 1.0.0 version with conda solved the problem:
peterjc123 commented Mar 5, 2018
@sshahpouri Would you please try this command? conda install -c peterjc123 vc msvc2017_runtime
lixite commented Oct 18, 2019
use torch 1.1.0, I think it was torch 1.3.0 before this.
ciphurus commented Mar 5, 2018
@peterjc123 When I tried the command, I get the following python.exe - System Error:
The program can't start because
api-ms-win-core-rtlsupport-l1-2-0.dll is missing from your computer. Try reinstalling the program to fix this probmel
peterjc123 commented Feb 21, 2018
@aviolov Can you check that _nvrtc.cp.. lies in the Anaconda dir?
SanketSanath commented Jun 6, 2019
There is a bug in torch version 1.1.0. Install 1.0.0 for MacOS.
pip3 install torch==1.0.0 torchvision==0.2.2.post3
This will solve the problem.
peterjc123 commented Jan 7, 2018
@HarshneetBhatia And I noticed there is a space inside your path of Anaconda install. Would you please try a path without it?
sshahpouri commented Mar 5, 2018
Another note: I just watched a video someone successfully installing PyTorch 0.2.1.
@peterjc123 do you have a link to 0.2.1 so that I can give that one a try?
ashish010 commented Sep 15, 2019
I installed Python version 3.6.8 and it solved my problem
animeshsingh04 commented Apr 30, 2018
C:\Users\Student\PycharmProjects\project\venv\Scripts\python.exe C:/Users/Student/PycharmProjects/project/shmm_main.py
Traceback (most recent call last):
File "C:/Users/Student/PycharmProjects/project/shmm_main.py", line 6, in
from hmmlearn import hmm
ModuleNotFoundError: No module named 'hmmlearn'
but when I'm trying to download hmmlearn package it showing this error
Collecting hmmlearn
Using cached https://files.pythonhosted.org/packages/dd/9e/6822b0cb04660f897cffb0ef39020423b342548803015f9b6e7dffeed2a8/hmmlearn-0.2.0.tar.gz
Installing collected packages: hmmlearn
Running setup.py install for hmmlearn: started
Running setup.py install for hmmlearn: finished with status 'error'
Complete output from command C:\Users\Student\PycharmProjects\project\venv\Scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Student\AppData\Local\Temp\pycharm-packaging\hmmlearn\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\Student\AppData\Local\Temp\pip-evb0i94l-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Student\PycharmProjects\project\venv\include\site\python3.6\hmmlearn:
running install
running build
running build_py
creating build
creating build\lib.win32-3.6
creating build\lib.win32-3.6\hmmlearn
copying hmmlearn\base.py -> build\lib.win32-3.6\hmmlearn
copying hmmlearn\hmm.py -> build\lib.win32-3.6\hmmlearn
copying hmmlearn\utils.py -> build\lib.win32-3.6\hmmlearn
copying hmmlearn_init_.py -> build\lib.win32-3.6\hmmlearn
creating build\lib.win32-3.6\hmmlearn\tests
copying hmmlearn\tests\test_base.py -> build\lib.win32-3.6\hmmlearn\tests
copying hmmlearn\tests\test_gaussian_hmm.py -> build\lib.win32-3.6\hmmlearn\tests
copying hmmlearn\tests\test_gmm_hmm.py -> build\lib.win32-3.6\hmmlearn\tests
copying hmmlearn\tests\test_multinomial_hmm.py -> build\lib.win32-3.6\hmmlearn\tests
copying hmmlearn\tests\test_utils.py -> build\lib.win32-3.6\hmmlearn\tests
copying hmmlearn\tests_init_.py -> build\lib.win32-3.6\hmmlearn\tests
warning: build_py: byte-compiling is disabled, skipping.
Command "C:\Users\Student\PycharmProjects\project\venv\Scripts\python.exe -u -c "import setuptools, tokenize;file='C:\Users\Student\AppData\Local\Temp\pycharm-packaging\hmmlearn\setup.py';f=getattr(tokenize, 'open', open)(file);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, file, 'exec'))" install --record C:\Users\Student\AppData\Local\Temp\pip-evb0i94l-record\install-record.txt --single-version-externally-managed --compile --install-headers C:\Users\Student\PycharmProjects\project\venv\include\site\python3.6\hmmlearn" failed with error code 1 in C:\Users\Student\AppData\Local\Temp\pycharm-packaging\hmmlearn
You are using pip version 9.0.1, however version 10.0.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
ImportError: DLL load failed: The specified module could not be found.
The text was updated successfully, but these errors were encountered:
superbobry commented Jan 29, 2016
Clearly SciPy installation is broken. Try reinstalling, if it doesn't help I suggest to open a SciPy issue and continue the discussion there.
ciphurus commented Mar 4, 2018
Is there any resolution for this? Facing the same error
peterjc123 commented Mar 4, 2018
@ciphurus Which package are you installing? If you are using conda ones, you can try updating vc packages. conda install -c peterjc123 vc
Solved
If you are working in a miniconda on conda environment. You could just install pywin32 using conda instead of pip.
This solved my problem:
I had to install it within a given conda environment (rather than in one I run jupyter notebook from). Nonetheless, it works!
We shall hold a festival in your name! Win 10 64-bit. Hours wasted. but thanks to this, issue solved. conda install pywin32 in my activated env didn't affect system32 and it avoided the need to run the postinstall script which failed because wintypes DLL was not found. It shouldn't be possible to get into this ridiculous state (I don't know how it happened) and it should not take this much work to get out. But thank you thank you thank you.
For my case, install and reinstall pywin32 doesn't help. After copied the two files from [installation directory of Anaconda]\Lib\site-packages\pywin32_system32 to C:\Windows\System32 , it works.
My environment is python 3.8 in miniconda. The two files are pythoncom38.dll and pywintypes38.dll .
Same issue under Python 3.8. Solution works, but I had to take the files under my virtual environment Lib folder
This information helped, but putting 3rd party stuff in C:\Windows\System32 is a recipe for future trouble. Think for instance what will happen if pywin32 updates the DLL and you don't copy them again to C:\Windows\System32 after a pip update. You will get an inconsistent system. In addition, all programs of the computer will "see" these DLLs. You should rather set the PATH as/where required.
For me, it worked by downgrading my pywin32 from version 227 to version 224. Just type the following command on any shell in administrator mode:
I get this error under Python3.8: Could not find a version that satisfies the requirement pywin32==224 (from versions: 225, 226, 227, 228)
You must not activate the base env, only the env that you want to use. Downgrading from 228 to 225 worked for me. pip install --upgrade pywin32==225 worked
As of November 2021, pip install --upgrade pywin32==300 works, pwin32 versions 301, 302 fail! [SO community members should get paid for their QA services :)]
Run Scripts\pywin32_postinstall.py -install in an Admin command prompt
edit: User @JoyfulPanda gave a warning:
Running this script with admin rights will also copy pythoncom37.dll, pywintypes37.dll (corresponding to the pywin32 version), into C:\WINDOWS\system32 , which effectively overwrites the corresponding DLL versions from Anaconda already there. This later causes problem when openning (on Windows) "Start Menu > Anaconda3 (64-bit) > Anaconda Prompt (a_virtual_env_name)". At least Anaconda 2019.07 has pywin32 223 installed by default. Pywin32 224 may work, but 225-228 causes problem for Anaconda (2019.07)
To run pywin32_postinstall.py, you need to python pywin32_postinstall.py -install , else you'll get an importerror about winreg
Running this script with admin rights will also copy pythoncom37.dll , pywintypes37.dll (corresponding to the pywin32 version), into `C:\WINDOWS\system32`, which effectively overwrites the corresponding DLL versions from Anaconda already there. This later causes problem when openning (on Windows) "Start Menu > Anaconda3 (64-bit) > Anaconda Prompt (a_virtual_env_name)". At least Anaconda 2019.07 has pywin32 223 installed by default. Pywin32 224 may work, but 225-228 causes problem for Anaconda (2019.07).
conda install pywin32 worked for me. I am using conda distribution and my virtual env is using Python 3.8
This happens when Lib\site-packages\pywin32_system32 is not in the list of directories to search for DLL (PATH environment variable).
pywin32 (or one of its dependencies) adds this path at runtime to the PATH variable. If this is failing, or another component is overriding the PATH after it's been set by pywin32, you will get the given error (ImportError: DLL load failed while importing win32api).
You can try to extend the PATH variable in the shell before starting Python.
If that doesn't work, then the PATH maybe overridden within the Python program at runtime. Add the following line to your program just before pywin32 is used to verify its value:
As a last resort, you can extend the PATH variable before pywin32 is loaded:
I have added absolute path of 'pywin32_system32' to the os.environ['PATH'] and still can't import win32api. Only copying the two dlls to the system32 could work.
Maybe because of this change in 3.8: DLL dependencies for extension modules and DLLs loaded with ctypes on Windows are now resolved more securely. Only the system paths, the directory containing the DLL or PYD file, and directories added with add_dll_directory() are searched for load-time dependencies. Specifically, PATH and the current working directory are no longer used, and modifications to these will no longer have any effect on normal DLL resolution.
C:\ProgramData\Anaconda3>py Scripts\pywin32_postinstall.py -install . Pythonwin has been registered in context menu Creating directory C:\ProgramData\Anaconda3\Lib\site-packages\win32com\gen_py Can't install shortcuts - 'C:\\ProgramData\\Microsoft\\Windows\\Start Menu\\Programs\\Python 3.8' is not a folder The pywin32 extensions were successfully installed.
For python 3.8.3, pywin32==225 worked for me, the existing pywin32==228 was uninstalled.
Hope it solves your problem
for me a similar approach worked. I downgraded from 227 to 226. also a newer version like 301 did not workout for me.
According to pywin32 github you must run
and after that, you must run
taken from here. worked for me!
I think this is the most orthodox solution amongst all available solutions. It works because extra pywin32 extensions need to be installed.
As of February 2022, downgrading tot version 303 of pywin32 solves the issue.
Check your pywin32 version:
Downgrade to version 300:
pypiwin32 is an outdated distribution. Uninstall it and install pywin32 :
Try to reinstall it; after all your experiments with different packages the DLLs could be broken: pip install --ignore-installed pywin32
thank you so much! actually it didn't work first when i just installed pywin32 but then i wrote in the scripts folder pywin32_postinstall.py -install , then i tried import win32api and no error appear!
All pywin32_postinstall.py doing is copying pywintypes[pyton version].dll and pythoncom[pyver].dll from \Lib\site-packages\pywin32_system32\ into main dir. Actually better to just manually copy to \Library\bin. Then it all works.
Windows 10, Python 3.8, PyWin32 v.302 using Anaconda
Here is what worked for me
Open an elevated command prompt activate environment
- Windows Key
- Type cmd
- Right click Command Prompt and click Run as Administrator
- conda activate [ENVIRONMENT]
Navigate to the environment you installed PyWin32 on, works if pip install or conda install is used
- cd C:\Users\[USER]\anaconda3\envs\[ENVIRONMENT]\Scripts
Run the post install script that was added when installing PyWin32
Jupyter notebook github has the issue mentioned in the question. There are multiple solution proposed.
my OS is win7 x64 . visual studio 2015, also visual studio 2013, and python 3.5 x64(by anaconda) are set up.
hmmlearn is set up successfully. and validated by the code:
>>>import hmmlearn
>>> hmmlearn.version
and the output is '0.2.0' which is last version of hmmlearn.
but, if i put the code like the following,
>>>from hmmlearn import hmm
i get the error as the following,
C:\Anaconda3_64\python.exe E:/pycharm/plot_hmm_stock_analysis/hmm_stock_analysis.py
Traceback (most recent call last):
File "E:/pycharm/plot_hmm_stock_analysis/hmm_stock_analysis.py", line 17, in
from hmmlearn import hmm
File "C:\Anaconda3_64\lib\site-packages\hmmlearn-0.2.0-py3.5-win-amd64.egg\hmmlearn\hmm.py", line 14, in
from sklearn import cluster
File "C:\Anaconda3_64\lib\site-packages\sklearn__init__.py", line 57, in
from .base import clone
File "C:\Anaconda3_64\lib\site-packages\sklearn\base.py", line 11, in
from .utils.fixes import signature
File "C:\Anaconda3_64\lib\site-packages\sklearn\utils__init__.py", line 11, in
from .validation import (as_float_array,
File "C:\Anaconda3_64\lib\site-packages\sklearn\utils\validation.py", line 16, in
from ..utils.fixes import signature
File "C:\Anaconda3_64\lib\site-packages\sklearn\utils\fixes.py", line 324, in
from scipy.sparse.linalg import lsqr as sparse_lsqr
File "C:\Anaconda3_64\lib\site-packages\scipy\sparse\linalg__init__.py", line 109, in
from .isolve import *
File "C:\Anaconda3_64\lib\site-packages\scipy\sparse\linalg\isolve__init__.py", line 6, in
from .iterative import *
File "C:\Anaconda3_64\lib\site-packages\scipy\sparse\linalg\isolve\iterative.py", line 7, in
from . import _iterative
ImportError: DLL load failed: The specified module could not be found.
why? and how to fix it!?
by the way, if in cmd, using "pip freeze" commond, it shows hmmlearn and the version of it is 0.2.0.
BUT, if using "conda list", no hmmlearn shows!!
The text was updated successfully, but these errors were encountered:
dhoksrushti commented Sep 13, 2017
I am facing the issue in Win 10 where I have manually downloaded scipy-0.19.1-cp35-cp35m-win_amd64.whl and reinstalled it. Still the issue persist
SanketSanath commented Jun 6, 2019
On MacOS Mojave I am getting
24 Answers 24
sshahpouri commented Mar 5, 2018
@peterjc123 I installed it with VS2017runtime, installation successful, installing pytorch successful, but importing torch raises the same error. (line 74)
As a side note, installing VS2017Runtime downgrades VC from 14.1 to 14. I guess this is intentional. Isn't it?
HarshneetBhatia commented Jan 7, 2018
@maatini In Anaconda do you have any idea how can this problem be solved ?
Because I not getting how to change the directory in Anaconda.
Patrikejane commented Sep 28, 2017
@dhoksrushti is you error solved? if solved is it from above mention fix?
maatini commented Jan 7, 2018 •
I had the same issue and it was caused by the directory torch which is generated in the same directory by compiling the source. The solution for me was simply changing the directory before open python.
code17lines commented Feb 22, 2018
I was trying to execute sample code from fast.ai course and I get similar error. I am new and just walking foot-steps to setup my jupyter notebook.
Below is my conda info
quancq commented Oct 2, 2017
rzsgrt commented May 29, 2019
Same found problem on Windows 10 ( ImportError: DLL load failed: The specified module could not be found. )
im installing with this conda install pytorch-cpu torchvision-cpu -c pytorch
actually forget about my previous version of python ( around 3.6.X) , but im updated my python to 3.6.8 and it solve the problem.
peterjc123 commented Jan 7, 2018 •
@HarshneetBhatia If if doesn't work after reinstalling Anaconda, then you can use sth. like Dependency Walker, open [Anaconda PATH]\Lib\site-packages\torch\lib\_C.pyd to detect what's wrong there.
rabem00 commented Oct 13, 2019
I had the same problem on windows 10 after installing with pip3 with python 3.7.4 and CUDA version 10.1. (My cuda driver is this version: NVIDIA CUDA 10.1.0 driver). But on an import the same error that others had.
To fix it i did the following; pip3 uninstall torch and reinstall with CUDA 9.2. The import goes fine now (torch.cuda.is_available is true, so everything is working). Hope this helps someone.
ezyang commented Jun 3, 2019
@nshervt This issue is tracking a Windows specific issue. If you have trouble installing PyTorch 1.1 from binary distributions on OS X, please file a new bug. Thanks!
huseyingurbuz commented Sep 18, 2019
I had the same error, i simply changed the environment in Anaconda from base to myenv that i had compatiple pytorch there. I assume one should install the right version of Pytorch
yan-zhao commented Oct 9, 2017
I'm on windows 10 python 3.5 64 bits. The standard numpy installation has no MKL in it. quancq's solution solved my problem.
peterjc123 commented Feb 20, 2018
@aviolov It's probably related to Visual C++ Redist 2017. Because the vc package will be updated if you install it through the conda channel. You can confirm this using the following steps:
If that works, then it should be MSVC related. Otherwise, maybe the cuda files are missing in PATH.
peterjc123 commented Mar 5, 2018 •
@sshahpouri @ciphurus Sorry for typo. It should be conda install -c peterjc123 vc vs2017_runtime .
maatini commented Jan 7, 2018
The problem in my case was that I started python from a (command)-shell from the directory in which I compiled pytorch. In this directory exists (was generated) the sub-directory torch, which python tries to load if you "import torch". So simply leaving the pytorch directory before starting python solved my problem.
sshahpouri commented Mar 5, 2018
tried conda install -c peterjc123 vc msvc2017_runtime
Solving environment: failed
PackagesNotFoundError: The following packages are not available from current channels:
n0obcoder commented Nov 6, 2019
@HarshneetBhatia Which version are you using? Do you have CUDA cards? How did you install it?
and yes i have GTX 1660 ti on my machine.
Thanks in advance :)
ciphurus commented Mar 5, 2018 •
No, I tried on anaconda command prompt and get the same error
(base) C:\Users\Admin>python
Python 3.6.4 |Anaconda custom (64-bit)| (default, Jan 16 2018, 10:22:32) [MSC v.
1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
import torch
Traceback (most recent call last):
File "", line 1, in
File "C:\Users\Admin\Anaconda3\lib\site-packages\torch_init_.py", line 76,
in
from torch._C import *
ImportError: DLL load failed: The specified procedure could not be found.
peterjc123 commented Mar 5, 2018
@ciphurus Please try the same command above and see whether it works.
ezyang commented Jan 7, 2018
@HarshneetBhatia Same as how you normally change directory: cd .
sshahpouri commented Mar 4, 2018 •
- Anaconda on Windows 7
- Updated VC already
- Tried both Torch and Torch_Legacy using Conda install -c peterjc123 pytorch cuda80
Same error on line 74 of __init__.py ( torch._C import * ) - already tried uninstalling/installing again, different users, different directories, no difference.
I am new to python so I may have missed something here. Please let me know if you need more information to pinpoint the cause.
genliu777 commented Jan 29, 2016
HarshneetBhatia commented Jan 7, 2018
@maatini I am using Anaconda can you please guide me how to change the directory.
Thanks in advance
peterjc123 commented Mar 5, 2018
@sshahpouri See the Easy Installation section of my repo.
vaishvel commented Oct 2, 2017
@dhoksrushti Facing the same issue. Any solutions?
nshervt commented Jun 2, 2019
Had the same issue on mac after upgrading. conda install pytorch=1.0.0 -c pytorch fixed the issue for me.
peterjc123 commented Mar 4, 2018
@ciphurus Hey! Your error seems not to be on the PyTorch side, since this error is not thrown from the torch package. Would you please run import torch test from command prompt to confirm this?
ciphurus commented Mar 4, 2018
Yes, I am using conda install -c peterjc123 pytorch on Windows 7. I also tried conda install -c peterjc123 pytorch_legacy and that too gave the same error.
Also tried what you suggested conda install -c peterjc123 vc but still getting the same error
from torch._C import *
File "C:\Users\Admin.p2\pool\plugins\org.python.pydev_5.9.2.201708151115\pysrc_pydev_bundle\pydev_import_hook.py", line 20, in do_import
module = self._system_import(name, *args, **kwargs)
ImportError: DLL load failed: The specified procedure could not be found.
Читайте также: