7

I am new in python and I am trying to work with geopandas library. I have already installed the package using:

conda install -c conda-forge geopandas

but when I try to import the library, I get back: ERROR SCREENSHOT

But searching in my computer directories I have already installed fiona and inside this directory, there is a file "_loading.py"

Isn't it strange that I have both packages installed and I have this error? Thank you in advance

Giorgos Tsim
  • 91
  • 1
  • 4
  • 2
    looks like you installed your gis packages in your base environment. start over with a fresh environment and install *every single package* from conda-forge (`conda create --name=gis python=3.8 geopandas notebook --channel=conda-forge`) – Paul H Apr 07 '21 at 23:33
  • Thank you @PaulH !!! it works now but the problem is that I don't have the other packages that i need.. like sklearn etc.. Is there any way to merge all the environments in one so that everything will work fine or i should install again the packages that i need at this environment? To be honest i wouldn't like to have many different environments.. Thank you again!! – Giorgos Tsim Apr 08 '21 at 11:18
  • If it helps i present here my environments and their paths: base * C:\Program Files (x86)\Microsoft Visual Studio\Shared\Anaconda3_64 C:\Users\george\Anaconda3 C:\Users\george\Anaconda3\envs\gis – Giorgos Tsim Apr 08 '21 at 11:31
  • 1
    You can add new packages to your "gis" environment, but *make sure they come from conda-forge* (e.g., `conda install scikit-learn --name=gis --channel=conda-forge`) – Paul H Apr 08 '21 at 13:57
  • 1
    I have added in new environment but still get this error. Can you please help? Should I remove this and install fiona again? – kirti purohit May 04 '21 at 06:59

2 Answers2

2

If you are using Jupyter Notebook or JupyterLab, you may just need to restart the kernel for the environment.

1

First, install python=3.7 then download the related library with the same version of python from here. https://www.lfd.uci.edu/~gohlke/pythonlibs. install all of them using pip

MD Gazuruddin
  • 540
  • 5
  • 9