I am using anaconda with sublime text 4 on Win11. Every thing works in the anaconda prompt, but in ST4, importing modules such as Numpy, Scipy will raise:
D:\Anaconda3\lib\site-packages\numpy\__init__.py:148: 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 22, in <module>
from . import multiarray
File "D:\Anaconda3\lib\site-packages\numpy\core\multiarray.py", line 12, in <module>
from . import overrides
File "D:\Anaconda3\lib\site-packages\numpy\core\overrides.py", line 7, in <module>
from numpy.core._multiarray_umath import (
ImportError: DLL load failed while importing _multiarray_umath...
Modules such as 'os' can be properly imported.
The path of anaconda has already been written in the settings of ST4 plugin Conda and Anaconda, as well as %PATH%.
This problem also happens on ST3 with Win10.
Related
I have installed the correct version of CuPy with pip install cupy-cuda117 on pyCharms as my CUDA is version 11.7. My Python version is 3.8. I also have the environment variables set but I am still receiving this message:
Traceback (most recent call last):
File "C:\Users\Dominic\PycharmProjects\Project_Trading\venv\lib\site-packages\cupy\__init__.py", line 18, in <module>
from cupy import _core # NOQA
File "C:\Users\Dominic\PycharmProjects\Project_Trading\venv\lib\site-packages\cupy\_core\__init__.py", line 1, in <module>
from cupy._core import core # NOQA
File "cupy\_core\core.pyx", line 1, in init cupy._core.core
File "C:\Users\Dominic\PycharmProjects\Project_Trading\venv\lib\site-packages\cupy\cuda\__init__.py", line 8, in <module>
from cupy.cuda import compiler # NOQA
File "C:\Users\Dominic\PycharmProjects\Project_Trading\venv\lib\site-packages\cupy\cuda\compiler.py", line 13, in <module>
from cupy.cuda import device
File "cupy\cuda\device.pyx", line 1, in init cupy.cuda.device
ImportError: DLL load failed while importing runtime: The specified module could not be found.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:/Users/Dominic/PycharmProjects/Project_Trading/regression_to_classification.py", line 77, in <module>
import cupy
File "C:\Users\Dominic\PycharmProjects\Project_Trading\venv\lib\site-packages\cupy\__init__.py", line 20, in <module>
raise ImportError(f'''
ImportError:
================================================================
Failed to import CuPy.
If you installed CuPy via wheels (cupy-cudaXXX or cupy-rocm-X-X), make sure that the package matches with the version of CUDA or ROCm installed.
On Linux, you may need to set LD_LIBRARY_PATH environment variable depending on how you installed CUDA/ROCm.
On Windows, try setting CUDA_PATH environment variable.
Check the Installation Guide for details:
https://docs.cupy.dev/en/latest/install.html
Original error:
ImportError: DLL load failed while importing runtime: The specified module could not be found.
================================================================
Process finished with exit code 1
Here is some additional info:
I ran into something similar when trying to install cupy recently. These are the steps that ultimately resulted in the import error:
Try to pip install cupy.
Realize that this is taking too long and/or requires a compiler etc.
Stop the install/build.
Install one of the prebuilt wheels (e.g. pip install cupy-cuda11x).
Notice that the cupy package is somehow installed (probably a remnant from the first stage).
pip uninstall cupy to get rid of the cupy library which shouldn't be there. << This is the stage that causes the problem!
The last step above breaks whichever mappings the wheel installer creates that allow one to import cupy despite installing a package called e.g. cupy-cuda11x.
The solution that worked for me was to remove all cupy* packages and install only the wheel distribution. In the case shown in the question, reinstalling cupy-cuda11x should do the trick.
I am trying to work with my Jupyter notebook. I have done so for the last 6 six years or so. Now I am getting the following error message:
Python Anaconda ImportError No module named menuinst.knownfolders
I checked several posts on the internet but nothing has helped: “conda install menuinst”. see here:
Python Anaconda ImportError No module named menuinst.knownfolders
I now have uninstalled and re-installed it three times but did not solve the issue.
When I go to my anaconda prompt and type in “jupyter notebook”, these are the error message I am getting:
C:\Users\User\anaconda3\lib\site-packages\setuptools\distutils_patch.py:25: UserWarning: Distutils was imported before Setuptools. This usage is discouraged and may exhibit undesirable behaviors or errors. Please use Setuptools' objects directly or at least import Setuptools first.
warnings.warn(
_cffi_ext.c
AppData\Roaming\Python\Python38\site-packages\zmq\backend\cffi\__pycache__\_cffi_ext.c(268): fatal error C1083:
Cannot open include file: 'zmq.h': No such file or directory
Traceback (most recent call last):
File "C:\Users\User\anaconda3\Scripts\jupyter-notebook-script.py", line 6, in <module>
from notebook.notebookapp import main
File "C:\Users\User\anaconda3\lib\site-packages\notebook\notebookapp.py", line 49, in <module>
from zmq.eventloop import ioloop
File "C:\Users\User\AppData\Roaming\Python\Python38\site-packages\zmq\__init__.py", line 50, in <module>
from zmq import backend
File "C:\Users\User\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line 40, in <module>
reraise(*exc_info)
File "C:\Users\User\AppData\Roaming\Python\Python38\site-packages\zmq\utils\sixcerpt.py", line 34, in reraise
raise value
File "C:\Users\User\AppData\Roaming\Python\Python38\site-packages\zmq\backend\__init__.py", line 27, in <module>
_ns = select_backend(first)
File "C:\Users\User\AppData\Roaming\Python\Python38\site-packages\zmq\backend\select.py", line 28, in select_backend
mod = __import__(name, fromlist=public_api)
File "C:\Users\User\AppData\Roaming\Python\Python38\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: cannot import name 'constants' from partially initialized module 'zmq.backend.cython' (most likely due to a circular import) (C:\Users\User\AppData\Roaming\Python\Python38\site-packages\zmq\backend\cython\__init__.py)
Just another piece of information, my anaconda prompt starts with (base) before it says C:\user\user>. Is that relevant or this issue?
You should try
conda remove zeromq
conda install zeromq
Solution-1
Please try to reinstall jupyter notebook from anaconda navigator it will definitely work
Solution-2
Please update jupyter notebook from anaconda prompt with below commands.
pip install notebook --upgrade
conda update notebook
I face the same issue..
1)Open anaconda prompt and type
conda list
2)Check terminado and
terminado 0.8.3
zeromq 4.3.2
3)In same anaconda prompt and check if python is working, type below code
python
if yes then
quit()
5)if no update python accordingly.
6)Type,
anaconda-navigator
This will open navigator and try to install jupyter notebook.
I have a project which I am packaging with cx_freeze. When I try to run the resulting exe I get an ImportError: DLL load failed: The specified module could not be found.
Here is my setup.py:
from cx_Freeze import setup, Executable
# Dependencies are automatically detected, but it might need
# fine tuning.
buildOptions = dict(build_exe='liquidation', packages=['scipy', 'numpy'], excludes=['scipy.spatial.cKDTree'],
includes=['scipy', 'numpy', 'numpy.core._methods', 'scipy.sparse.csgraph._validation',
'numpy.lib.format', 'numpy.linalg._umath_linalg', 'scipy.sparse._csparsetools',
'scipy.sparse.linalg.isolve._iterative', 'scipy.sparse.linalg.eigen.arpack._arpack',
'scipy.special._ufuncs_cxx', 'scipy.special.specfun', 'scipy.integrate._odepack',
'scipy.integrate._quadpack', 'scipy.integrate.vode', 'scipy.integrate._dop',
'scipy.integrate.lsoda', 'scipy.optimize._minpack', 'scipy.optimize._zeros',
'scipy.spatial', 'scipy.spatial.ckdtree', 'scipy.spatial.kdtree',
'scipy._distributor_init', 'numpy.core._multiarray_umath'])
base = 'Console'
executables = [
Executable('liquidation.py', base=base, targetName='liquidation.exe')
]
setup(name='liquidation',
version='2.0',
description='Program to run and test Liquidation algorithms',
options=dict(build_exe=buildOptions),
executables=executables)
When I run python setup.py build_exe it seems to complete successfully, but when I run the exe I get the following output:
Traceback (most recent call last):
File "C:\Users\tamar\PycharmProjects\liquidation\venv\lib\site-packages\numpy\core\__init__.py", line 24, in <module>
from . import multiarray
File "C:\Users\tamar\PycharmProjects\liquidation\venv\lib\site-packages\numpy\core\multiarray.py", line 14, in <module>
from . import overrides
File "C:\Users\tamar\PycharmProjects\liquidation\venv\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 "C:\Users\tamar\PycharmProjects\liquidation\venv\lib\site-packages\cx_Freeze\initscripts\__startup__.py", line 40, in run
module.run()
File "C:\Users\tamar\PycharmProjects\liquidation\venv\lib\site-packages\cx_Freeze\initscripts\Console.py", line 37, in run
exec(code, {'__name__': '__main__'})
File "liquidation.py", line 64, in <module>
from io_tools.stock_wrapper import StockWrapper
File "C:\Users\tamar\PycharmProjects\liquidation\io_tools\stock_wrapper.py", line 4, in <module>
from io_tools.io_helper import *
File "C:\Users\tamar\PycharmProjects\liquidation\io_tools\io_helper.py", line 7, in <module>
from numpy import float_
File "C:\Users\tamar\PycharmProjects\liquidation\venv\lib\site-packages\numpy\__init__.py", line 142, in <module>
from . import core
File "C:\Users\tamar\PycharmProjects\liquidation\venv\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\tamar\PycharmProjects\liquidation\liquidation\liquidation.exe",
and that you have no directories in your PATH or PYTHONPATH that can
interfere with the Python and numpy version "1.18.3" 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 understand that I need to point cx_freeze to the missing DLL's (either by adding them to buildOptions.include_files or by actually copying the DLL's to the build folder) but I am at a loss as to how to know which DLL's I am missing. numpy.core._multiarray_umath is in the build folder so I don't know what it could be.
I believe I am using the latest versions of numpy (1.18.3), scipy (1.4.1) and cx-freeze (6.1). Any help would be much appreciated!
Update: I used Dependency Walker to try and see what I am missing and it listed a file by the name of LIBOPENBLAS.SVHFG5YE3RK3Z27NVFUDAPL2O3W6IMXW.GFORTRAN-WIN32.DLL which cannot be found. All of the other dependencies have been copied into the build so it makes sense that this would be the missing one. Does anyone know where I can find this file?
I am trying to get a github repository to work on my pc. This repository is based on tensorflow-gpu. Currently, when I try to run the code, I get the following error:
Traceback (most recent call last):
File "D:/audio/deep-voice-conversion-master/deep-voice-conversion-master/convert.py", line 9, in <module>
from models import Net2
File "D:\audio\deep-voice-conversion-master\deep-voice-conversion-master\models.py", line 4, in <module>
import tensorflow as tf
File "D:\audio\deep-voice-conversion-master\deep-voice-conversion-master\venv\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "D:\audio\deep-voice-conversion-master\deep-voice-conversion-master\venv\lib\site-packages\tensorflow\python\__init__.py", line 59, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "D:\audio\deep-voice-conversion-master\deep-voice-conversion-master\venv\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
File "D:\audio\deep-voice-conversion-master\deep-voice-conversion-master\venv\lib\site-packages\google\protoWbuf\descriptor.py", line 47, in <module>
from google.protobuf.pyext import _message
ImportError: DLL load failed: the specified module could not be found.
I am using pycharm on windows 10, with python 3.6.
I tried to follow these steps, but it seems outdated and I did not get it to work. I also prefer not to use anaconda, as this is a huge package and I only want to get this repository to work. So far, I have done the following:
I have installed all required packages (including the tensorflow and tensorflow-gpu packages) via pip.
I also downloaded CUDA 9.0 and cuDNN.
I have copied the files from cuDNN's bin, include and lib folders into the corresponding folders from CUDA.
I added the path to the cuda folder to the environment PATH from windows
I added the CUDA and cuDNN folder paths to the Content root folders of the project structure in pycharm (probably not helpful but someone somewhere suggested it)
I am new to tensorflow and I have no Idea what I have to do next. Any help will be appreciated.
protobuf seems to be a conda package. Try installing it with
conda install protobuf
Or
pip install protobuf
I have been trying to find a solution to this import error regarding the pandas library when it says no module named "parsing." Every library should be installed correctly from the interpreter and they are all the latest version.
This is what the console returns:
Traceback (most recent call last):
File "C:\Users\shaya\PycharmProjects\NEA\venv\lib\site-packages\pandas\__init__.py", line 26, in <module>
from pandas._libs import (hashtable as _hashtable,
File "C:\Users\shaya\PycharmProjects\NEA\venv\lib\site-packages\pandas\_libs\__init__.py", line 4, in <module>
from .tslib import iNaT, NaT, Timestamp, Timedelta, OutOfBoundsDatetime
File "pandas\_libs\tslibs\conversion.pxd", line 11, in init pandas._libs.tslib
File "pandas\_libs\tslibs\conversion.pyx", line 40, in init pandas._libs.tslibs.conversion
ModuleNotFoundError: No module named 'parsing'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:/Users/shaya/PycharmProjects/NEA/Main.py", line 4, in <module>
import pandas_datareader.data as data
File "C:\Users\shaya\PycharmProjects\NEA\venv\lib\site-packages\pandas_datareader\__init__.py", line 2, in <module>
from .data import (DataReader, Options, get_components_yahoo,
File "C:\Users\shaya\PycharmProjects\NEA\venv\lib\site-packages\pandas_datareader\data.py", line 7, in <module>
from pandas_datareader.av.forex import AVForexReader
File "C:\Users\shaya\PycharmProjects\NEA\venv\lib\site-packages\pandas_datareader\av\__init__.py", line 3, in <module>
from pandas_datareader.base import _BaseReader
File "C:\Users\shaya\PycharmProjects\NEA\venv\lib\site-packages\pandas_datareader\base.py", line 7, in <module>
import pandas.compat as compat
File "C:\Users\shaya\PycharmProjects\NEA\venv\lib\site-packages\pandas\__init__.py", line 35, in <module>
"the C extensions first.".format(module))
ImportError: C extension: No module named 'parsing' not built. If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first.
All of the above tracebacks are from PyCharm.
OS: Windows.
I am using pip to install packages
Python version: 3.7.1, panda version: 0.23.4
Do you have python added to path? To test this; open a cmd and type python. If it is on your path, you should see the version of python you are running (Assuming you are using a windows machine). If this is the case, you can simply run the command after you checked this. If not, please navigate to the location where Python is installed, open python.exe and try to run the command python setup.py build_ext --inplace --force
If this doesn't work, you should try to re-install pandas by pip install --upgrade --force-reinstall pandas
If this also fails you could also go rigourous, and simply create a new environment and install pandas there. Sidenote: It is probably better to install pandas by using conda package manager, Pandas has portions of its code written in C to make it run faster. If you tried to install pandas manually you would need to build it.
I had the same problem under the same circumstances. I went through the code of some of the pandas files and saw that there is indeed a module named 'parsing' in the tslib folder of my pandas directory, yet for some reason it's not able to call it. I just reinstalled python and now it's working for me. If you find any other alternative, please let me know.