I received the following error when trying to install geopandas in my environment after it failed in the terminal via the conda-forge command. Is there a way to get this updated and fixed?
Output in format: Requested package -> Available versions
Package geopandas-base conflicts for:
geopandas -> geopandas-base==0.9.0=py_1
geopandas-base
Package ca-certificates conflicts for:
python=3.9 -> openssl[version='>=1.1.1q,<1.1.2a'] -> ca-certificates
geopandas -> python -> ca-certificates```
You’re installing geopandas into an existing environment with conflicting packages. This can happen when the other env has packages pinned to specific incompatible packages, or if packages have been installed from incompatible channels, e.g. if you’re installing into your base env using anaconda, or (though this happens less often these days) if it’s just been a really long time since you updated your packages.
Instead, create a new environment with the packages you need, e.g.:
conda create -n geopandas -c conda-forge python=3.10 geopandas gdal pygeos pandas scipy […]
If you’d like to delete the previous environment you can do so with
conda env remove -n other-env-name
If you continue to have issues and you’re using anaconda, I’d strongly suggest deleting anaconda, which bundles packages from the defaults channel which is incompatible with conda-forge, and install miniforge or it’s much faster compiled (but slightly less user friendly) cousin mambaforge.
$ conda install -c anaconda pip
$ pip install geopandas
Related
I tried to install seamsh 0.4.4(https://pypi.org/project/seamsh/) but counld not.
I spent a lot of time on it.
I needed gdal library to use seamsh.
So I installded it by conda because it was too complex to install it without conda.
But conda was not supported seamsh, so I don't know what to do.
Could you tell me how to install seamsh?
I use windows and vscode.
Thank you.
There's a pending PR to add it to Conda Forge. In the meantime, one can install it from PyPI. For example, try using the following environment:
seamsh.yaml
name: seamsh
channels:
- conda-forge
- nodefaults # only use conda-forge
dependencies:
## core software
- python=3.10 # set to preference
- pip
## libraries
- gdal
## Conda Python packages
- numpy
- scipy
- python-gmsh >=4.10 # used to ensure latest version
## PyPI Python packages
- pip:
- seamsh
Create with:
conda env create -n seamsh -f seamsh.yaml
At least on macOS, I'm seeing pip reinstall the Python gmsh package, despite the Conda Forge version being installed. Unsure why it isn't acknowledging the Conda version.
I've a conda install that's giving me an install of pysal back on version 2.1.0 (it's currently 2.5.0) ... and I'm trying to figure out which of the 73 already installed packages has specified such an old version.
I know pydeps will find me the dependencies for a given package... all the packages required to run foo - but I want to go the other way: what packages need foo to be present (and the version they ask for would be nice.)
(I've got as far as recognising it's probably going to involve hunting through the json files in conda-meta)
you can use pipdeptree:
pip install pipdeptree
pipdeptree
and get the dependencies in a tree form, like:
flake8==2.5.0
- mccabe [required: >=0.2.1,<0.4, installed: 0.3.1]
- pep8 [required: !=1.6.0,>=1.5.7,!=1.6.1,!=1.6.2, installed: 1.5.7]
- pyflakes [required: >=0.8.1,<1.1, installed: 1.0.0]
ipdb==0.8
- ipython [required: >=0.10, installed: 1.1.0]
one of the packages has installed this version but probably, it does not depend on this specific version, so you can also try to just install the most recent version and test if it works.
Test and figure out dependencies is one of the reasons why we use virtual environments (like conda) so don't be afraid of break everything, if it happens, just save the env:
conda env export > your_env_name.yml
create the virtualenv again:
conda env create -f environment.yml
or just clone your current env to another before change it:
conda create --name current_env_name --clone backup_env
I'm using conda with Spyder/Python 3.8.8.
I'm trying to install the geopandas package through conda-install, but when running it, I receive no output.
I've input the command conda install -c conda-forge geopandas and let it run for 30 minutes so far, so I doubt it's just a large package or poor connection. I don't know if I'm supposed to be seeing progress updates, but if I am, I'm not.
Any help is appreciated, thanks!
If you are using the base Anaconda environment, then there are packages that are conflicting with geopandas. I suggest you to create new environment for geopandas:
open anaconda command line and run this command to create new environment:
conda create --name gis python==3.8
You can use any version of python you like of course. Then you need to activate it:
conda activate gis
Now you can install geopandas and jupyter lab if you need it (Personally recommend VSCode):
conda install -y -c conda-forge geopandas jupyterlab
enter code here
Use below command to install,
conda install geopandas
or
pip install geopandas
When using pip to install GeoPandas, you need to make sure that all dependencies are installed correctly.
fiona provides binary wheels with the dependencies included for Mac and Linux, but not for Windows.
pyproj, rtree, and shapely provide binary wheels with dependencies included for Mac, Linux, and Windows.
Windows wheels for shapely, fiona, pyproj and rtree can be found at Christopher Gohlke’s website.
Depending on your platform, you might need to compile and install their C dependencies manually. We refer to the individual packages for more details on installing those. Using conda (see above) avoids the need to compile the dependencies yourself.
This solution might not be exactly relevant, but since there is no marked solution, it might help...
I recently ran into a problem installing geopandas as well. Though I did mine through my terminal and I did receive an error message: OSError: could not find or load spatialindex_c-64.dll.
I used: conda install -c conda-forge rtree=0.9.3.
Check out this post for more info.
After uninstall of Anaconda, and subsequent install in a different location (although, on the same PC), when I try this:
conda create --name xxx python==3.7
conda activate xxx
conda install -c conda-forge pandas opencv tesseract matplotlib
After hours of waiting, I see conda printing messages about how it found conflicts with libraries that have nothing to do with what it was asked to install, eg. Dask and so on.
By the way, Dask (likewise most other packages it finds conflicts with) was never installed on that PC, so, it's not a problem of stale cache.
Provided how idiotic this tool in general is... may I hope for a way to only install what it was told to install, and not check compatibility with things nobody asked it to install?
I was lately trying to update all my Anaconda packages:
conda update conda
conda update anaconda
Some of them still were not updated, so I also did conda update --all.
Right now my conda version : 4.3.16, which seems to be the latest release. However, for some reason, matplotlib still has old version:
conda list
matplotlib 1.5.1 np111py35_0
According to the Anaconda changelog, it should be updated to 2.0 version: matplotlib from 1.5.3 to 2.0.0.
My installed python version is 3.5.2, if this matters.
UPD: Seems that spyder-app is blocking update because of problem with dependencies:
conda install anaconda=4.3.1
UnsatisfiableError: The following specifications were found to be in conflict:
- anaconda 4.3.1* -> spyder 3.1.2 py34_0
- spyder-app -> spyder 2.3.3
Use "conda info <package>" to see the dependencies for each package.
conda install matplotlib=2
UnsatisfiableError: The following specifications were found to be in conflict:
- matplotlib 2.0*
- spyder-app -> spyder 2.3.0 -> pyqt 4.* -> qt >=4.8.6,<5.0
- spyder-app -> spyder 2.3.0 -> pyqt 4.* -> sip >=4.16.4,<4.18
Use "conda info <package>" to see the dependencies for each package.
UPD2: Problem was solved by removing spyder-app:
conda remove spyder-app
conda update anaconda
Matlotlib was updated to the 2.0 version, among other updated packages. I also checked if Spyder IDE still works, and it still is able to run.
It probably is a dependency conflict. The anaconda package is just a meta-package that bundles packages, if some package can't be updated because of a package you installed (maybe requiring matplotlib < 2, or even indirectly by requiring a package and version that matplotlib depends on) then you probably can't install the newest version of the anaconda package. You could try to install the newest anaconda package (currently 4.3.1) yourself:
conda install anaconda=4.3.1
But you can also try to install a specific version of matplotlib manually and see what happens (there should be an instructive message if it can't install it because of dependencies):
conda install matplotlib=2
In your case it's spyder-app that is responsible. It's a deprecated package and not included in newer versions of anaconda so one possibility is to remove it:
conda remove spyder-app
and then try the update of anaconda or matplotlib.
Another way would be to create a new environment and then you can choose which environment to use when:
conda install -n mynewenvironment python=3.5 anaconda
and then use the new environment when you need matplotlib 2 and the old environment if you need spyder-app (and don't care about the matplotlib version).