-
-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: DLL load failed while importing _version: The specified procedure could not be found. #250
Comments
Hi @Vaspra, it looks from your
In the last command, list as many packages as you need to.
There may be some Windows nuances that I don't know about. I'm a Linux user myself. |
Hi @xylar, thanks for the quick reply. I have created an environment entirely from The application I am attempting to use (https://poissonfish.github.io/GRID/ch1_started/installation.html#step-3-install-grid-via-pypi) has instructions to install rasterio using conda-forge but then instructs to install the application itself through pip/pypi. I have tried to tell pip to install packages through the conda-forge index url, but packages wind up not being found as I guess they're only hosted on pypi. I'm assuming the required rasterio files are only on conda-forge, so am I left in a situation where I cannot obtain 100% of packages required for both rasterio and this application from one source, unless I am mistaken. |
@Vaspra, thanks for the clarification. It sounds like your issue isn't caused by mixing channels as I suspected. It seems like it might be the same as #240, which I'm sorry to say that I don't have the expertise to help with. I do hope someone with expertise in windows and a windows machine can help! |
Hi @Vaspra , I ran into a similar issue when installing rasterio. I followed tips here: I recommend the package maintainer update the README to include this tip. |
I recently ran into this issue as well: https://github.com/corteva/rioxarray/actions/runs/3652596990/jobs/6171179962. The strange thing is that it was working fine 10 days ago and there hasn't been any rasterio release since then. 🤔 |
I have this issue as well, it worked fine a month ago, I updated a different GDAL installation through OSGEO4W thogh(QGIS stuff) |
Can confirm that the issue is going on today. I installed it on a functional and existing env, seems to be working on a completely empty env so I'm guessing there's a conflict somewhere |
I needed to solve this by downgrading in a completely new Conda env which is really suboptimal |
I got this error after updating pandas and accepteing all changes suggested by the pandas update. I fixed it with:
Now it works. |
After doing my research I found a way to make GDAL and Rasterio work on Jupyter Notebooks to avoid the "dll load failed while importing"
Example:
Example:
EXTRA NOTES
|
Solution #2 After installing 1 by 1 I figured out that GDAL version gets changed with Basemap, which messes up the packages and the dll error starts to appear. I instead installed CartoPy and Everything Seems fine. Following is the lines I use to install and the dependencies: Installation commands
Dependencies:
|
Hi @DevAlvaroF Thanks for your work! I also ran into this problem recently. So I came across your solution. However, instead of doing all this environment stuff, I just simply tried to do what you wrote in step 2, while still having
Simply import |
I just encountered the same issue with the latest conda build (after a name: rasterio_39
channels:
- conda-forge
dependencies: # everything under this, installed by conda
- python=3.9
- rasterio Error is:
The package list is:
The conda info lines:
Note that I managed to make it work for ages, and now somehow it breaks 🤷♂️ |
I tried again with conda 3.27.+ The same environment as above still fails. name: rasterio_39
channels:
- conda-forge
dependencies: # everything under this, installed by conda
- python=3.9
- gdal
- rasterio>1.3.0 How come I need to import osgeo first to make it work ? Somebody knows ? |
If importing osgeo before rasterio works for you it is a sign that you have some mixed installation. Maybe some packages from PyPI or an external installation of gdal. I just tested taht env file on a fresh Windows machine, new miniforge installation, and everything works as expected. |
Everything is done on a fresh conda install sadly… as you see there is nothing install via pip as stated in the yaml |
You can still have some external gdal installation on your machine. |
You are exactly right, it was a QGIS install that was messing with the rasterio's conda installation 😓 However this is not ideal for us 😢 |
I'm not an expert on QGIS but most folks I know use the one provided by conda-forge to avoid those incompatibilities. If you need features that are not in the QGIS available in conda-forge, then you'll have to figure out a way to isolate them to avoid this conflict. |
@remi-braun is this issue still valid for you? |
Yes, we still need to add or remove QGIS from our PATH according to the environment we have |
Solution to issue cannot be found in the documentation.
Issue
Error as above, stack:
Seems to be running into trouble with
._version
. Local filename of this in sitepackages is_version.cp38-win_amd64.pyd
.I have tried multiple versions of python, all with fresh installs and environments. Any help would be appreciated.
All instruction steps followed for install.
Installed packages
Environment info
The text was updated successfully, but these errors were encountered: