Geopandas says it's installed, but when I try to import, I get OSError

235 Views Asked by At

I've never had a problem installing a python package, but I use a variety of installation methods on my Mac (conda, pip, brew).

When I use conda to install geopandas: see error below, but geopandas 0.6.1 is installed (newest version ATM is 0.9.0, conda upgrade geopandas does nothing)

When I use pip to install geopandas: no problem, 0.9.0 shows up when I run pip list

I've even tried conda install -c conda-forge geopandas , admittedly I have no idea what the difference is here.

But no matter how I install it, I go to import it in my python script and I get this error:

OSError: Could not find lib c or load any of its variants [].

I've tried importing in Spyder and VSCode but I doubt that would make a difference.

I've tried uninstalling and reinstalling the package multiple times. I think it might have something to do with my conda environment? But I've never run into an issue like this before. I say that because at the end of installing through conda or condo-forge, I get this warning:

Verifying transaction: \ WARNING conda.core.path_actions:verify(962): Unable to create environments file. Path not writable.
  environment location: /Users/me/.conda/environments.txt

done
Executing transaction: - WARNING conda.core.envs_manager:register_env(50): Unable to register environment. Path not writable or missing.
  environment location: /Users/me/opt/anaconda3
  registry file: /Users/me/.conda/environments.txt
1

There are 1 best solutions below

0
On

Uninstalling on conda and pip and reinstalling using conda install -c conda-forge geopandas seemed to work.. this time. I swear I did it 3x before this one. Hope this helps another confused python user!