I'm using python 2.6.6 (32bits) on windows 7 and I try to upgrade from Pandas 0.13.0 to Pandas 0.14.1
I can't upgrade to newer version of python due to IT policy.
I tried using the tar.gz package, using the compiled pandas version found here pandas‑0.14.1.win32‑py2.6.exe, even reinstalling everything (numpy, py-tz, dateutil...), but I got always the same error:
File "c:\python26\lib\site-packages\pandas\__init__.py", line 6, in <module>
from . import hashtable, tslib, lib
ImportError: DLL load failed: The specified procedure could not be found.
I defined the python path PYTHONPATH to C:\Python26\Lib;C:\Python26\DLLs;C:\Python26\Lib\lib-tk; but it does not make any difference. However the hashtable.pyd, tslib.pyd and lib.pyd do exist in the proper directory.
I've googled the problem, and in some case using the exe from the site of Christoph Gohlke helps , but I already tried and the error is always the same.
Any idea? So far I'm blocked to version 0.13.0 as even 0.13.1 gives the same error.
Thanks.
Related
I'm using python 3.6 and attempting to import win32com.client as win32 to be able to send an email with outlook but keep getting the above import error.
I've installed both pywin32 and pypiwin32 and run the postinstall script (did see it say "You do not have the permissions to install COM objects.)
I see the pywintpyes36.dll and pyhoncom36.dll in the location I'm running the script out of.
I've done a bit of searching and can't seem to find what I'm missing. Is it the fact that I was unable to install the COM objects? Any help would be greatly appreciated, thanks.
[EDIT]
I'm working out of a venv, and have installed both libraries using py -m pip install pywin32 and py -m install pypiwin32. I verified that I see the installation in the "site-packages" folder within my venv.
my imports:
import sys
sys.path.append("C:\path\venv\Lib\site-packages")
import tkinter as tk
import getpass
import os.path
import time
import os
import win32com.client as win32
import sqlite3
from datetime import datetime
from functools import partial
I have the sys.path.append there otherwise the module is not found at all.
Full error message:
Traceback (most recent call last):
File "C:\path\program.py", line 8, in <module>
import win32com.client as win32
File "C:\path\venv\Lib\site-packages\win32com\__init__.py", line 5, in <module>
from win32 import win32api
ImportError: DLL load failed: The specified module could not be found.
This may not be directly relevant for the OP, but may be of help to others who end up here based on the title.
Summary
Possible workaround for conda environments with Python>=3.8:
DO NOT pip install pywin32, but
DO conda install pywin32 (e.g. from conda-forge)
Details
I encountered the following error in a freshly created (Mini-)Conda environment with Python 3.9 on windows 10, after installing pywin32 via pip:
ImportError: DLL load failed while importing win32file: The specified module could not be found.
The pywin32 installation instructions mention this type of issue explicitly, and there are several related issues.
However, in my case something else was going on.
Here are some interesting observations:
I have numerous other, pre-existing, conda environments, with python versions ranging from 2.7 to 3.8, and corresponding pywin32 versions, in which the issue does not arise (just verified this).
All these environments have their own pywintypesXX.dll etc. yet they coexist peacefully.
There is no pywintypesXX.dll in my system32 folder.
I have never needed to run the pywin32_postinstall script, yet.
As it turns out, on my system, the import error only arises if I do a pip install pywin32 in a conda environment with Python>=3.8. The issue does not arise for Python 3.7 (nor for 2.7).
In a Python>=3.8 conda environment, conda install pywin32 fixed the issue (instead of using pip).
Apparently Python 3.8 changed the way dll files are found. This change has been incorporated in pywin32, but can still cause trouble if you mix conda and pip.
Related:
DLL load failed: The specified procedure could not be found. win32api, sys, os
How to fix "ImportError: DLL load failed" while importing win32api
How to fix 'DLL load failed while importing win32api' in Jupyter notebook after connecting VS code to Jupyter notebook?
Trying to get the samplebinding example working, but no matter the compiler, python or pyside version used, I still get
ImportError: DLL load failed while importing Universe: The specified module could not be found.
Last configuration used:
VS2019
cmake 3.16.2
python 3.81 amd64 from python.org
pyside2, shiboken2 5.14.1 from pip
shiboken-generator whl 5.14.1 from here
Library is compiling fine:
Python 3.8 changed the dll path resolution.
Adding the shiboken2.abi3.dll to the folder resolved the issue.
Modify the import to be Python3 compatible:
from build.Universe import Icecream, Truck
The import of __future__.print_function suggests the file is still written for Python2.
Trying to use cvxopt with Anaconda.
Followed installation instruction here: How to install cvxopt for Python 3.5 on Windows 7
But got the error:
import cvxopt
File "C:\Anaconda3\lib\site-packages\cvxopt\__init__.py", line 32, in <module>
import cvxopt.base
ImportError: DLL load failed:
Also tried to install numpy-mkl, but also got error "No matching distribution found for numpy-mkl"
I don't seem to find cvxopt.base or pyd in the site-package folder though. What to do next please?
Environment: Windows 7 64 bit; conda 4.3.22 (python 3.5)
Resolved by following below:
import cvxopt.base: the specified module could not be found
Reinstalled numpy and cvxopt from:
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy
It seems the cvxopt installation mentioned here causes some problems on my machine (unknown version number):
How to install cvxopt for Python 3.5 on Windows 7
So many questions already about this topic, but I didn't find any satisfying answer about the "DLL not found" traditional issue.
I'm using Python 3.5 installed via Anaconda 3;
I have installed with pip the 'official' opencv_python-3.2.0.6-cp34-cp34m-win_amd64.whl (right from here https://pypi.python.org/pypi/opencv-python);
Windows version is 7 - 64 bits;
I have uninstalled all the redistributable VC++ that were present on my machine and reinstalled its 2015 version - so the famous as well as mandatory DLL msvcp140.dll is present on my laptop;
the cv2 module is present in the Lib/site-packages directory;
it contains, among others, file 'cv2.cp35-win_amd64.pyd'.
Meanwhile, I still can't get access to cv2:
>>> import cv2
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
import cv2
File "C:\Program Files\Anaconda3\lib\site-packages\cv2\__init__.py", line 7, in <module>
from . import cv2
ImportError: DLL load failed: The specified module could not be found.
Modifying the name of the .pyd --> cv2.pyd does not solve the problem, nor does the installing via pip of the unofficial but great wheel version from Gohlke (http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv)
Any idea about what is going on?
As mentioned in the comment which I didn't notice at first, you can resolve this by installing from the unofficial site (Gohlke)
(http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv)
I uninstalled the official one by calling:
pip uninstall opencv-python
And then downloaded the .whl package from the mentioned site (you need to carefully choose the correct python version and the correct processor architecture x86 or x64).
And then, go to the path where the .whl file is downloaded and call:
pip install opencv_python-x.x.x-cpxx-cpxxm-win_xx.whl
Regarding the comment in the question, always remove any existing opencv package before installing another one because, opencv from unofficial and official sites will be considered as 2 packages by pip.
You can install official opencv if you follow my answer here. You get that error because of a problem with Anaconda.
But if you install official opencv it will autocomplete and give suggestions in your python IDE (see this). So, if you need autocomplete as well, you need to go with unofficial opencv.
I had the same issue. This helps me:
conda install -c menpo opencv3
Found at https://www.scivision.co/install-opencv-python-windows/
I have installed pymssql using pip however It is never found when I try to import into a project.
I get the error, No module found 'pymssql'
I have attempted to copy the .pyd file (pymssql-2.1.2-cp35-cp35m-win_amd64.pyd) to the project directory and this is still a problem
So. just using...
import pymssql
...results in the module not being found, If I try to reinstall through pip it states it is installed and requirement is already satisfied.
How can i get this useable
I am using Python 3.5 and Windows 10
Python is installed in Appdata/Local/Programs/Python35
Modules are installed Appdata/Roaming/Python35/site-packages/
Installing the .whl file manually from the Pymssql website resolved the issue and allowed me to use the module in my project!