I'm currently trying to reinstall Geopandas as well as Geoplot. The packages were installed previously, and worked fine earlier today. However due to a package limitation I needed to reinstall anaconda completely.
I've tried installing it via the navigator to no avail. looking through previous questions I tried running:
conda install geopandas
as well as, and for Geoplot
conda install geoplot -c conda-forge
now when I try importing the packages into Spyder IDE (3.3.3) I receive this error:
ImportError: cannot import name 'buffer_to_virtual_file' from 'fiona.ogrext' (unknown location)
I figured it may have had something to do with Fiona, so I uninstalled and reinstalled that, as well as update all packages via:
conda update --all
At this point I'm lost, installation through the console isn't my strong suit and I'm not entirely sure what options to take next. Let me know if you need me to list anything else.
Related
Alright, so I installed Anaconda 2.3.2 and run it as admin, then I tried to import the package graphviz, so I installed it with:
conda install -c anaconda graphviz
which is what was recommended in the (official documentation for anaconda)
however, when I tried to import the package with either:
import graphviz
or just a function with
from graphviz import Source
I get the same error:
ModuleNotFoundError: No module named 'graphviz'
I tried installing the package again, but anaconda doesn't seem to recognize it (I'm using a jupyter notebook and everything else runs alright). Is there some other path that it's missing or something?
I tried reinstalling anaconda from scratch, but that didn't work either.
I finally got it to work, although it seems a bit cluncky... I had to use a double installation, by using the command
pip install graphviz
It finally started to be recognized, however, I also needed to use the "dot" command from the command line to transform a graph into a png image, and it wasn't being recognized, however, after I made a SECOND installation with:
conda install graphviz
For some reason, that made it work... at last.
Since Conda is a generic package manager - not just Python - one needs to distinguish somehow when a package is a Python wrapper versus a library or other compiled binary. In this case, the Python wrapper, which goes by graphviz on PyPI and delivers the graphviz module in Python, goes by python-graphviz on Conda. So, one would use
conda install python-graphviz
to get this. The upside here is that this Conda package lists graphviz as a dependency and so will also install that.
I have been using the package yfinance to retrieve stock prices for some time. Recently, as noted in several online posts, the package stopped working due to an update to the package. I thought that this would be a simple process to update the package and fix the problem. This has not been the case.
I am using Anaconda so I want to update using conda instead of pip using PowerShell on a PC.
What I have tried so far unsuccessfully
$ conda update --all
$ conda update conda
$ conda update-c ranaroussi yfinance
None of these worked. I tried to uninstall and then reinstall Anaconda then reinstall yfinance. Yes, I agree that this seemed like overkill for what should have been a simple issue. Unfortuntaelty, now I can't even install the package. I am using the conda command that I originally used to install the package
$ conda install -c ranaroussi yfinance
, which comes from the developer's page.
https://anaconda.org/ranaroussi/yfinance
Now, I try to run this I receive an error message that the package cannot be found in my current channels.
Screenshot of error msg.
At this point, I am just spinning my wheels and would appreciate some help. I hope that someone who might have experienced a similar issue has a suggestion for how to resolve this problem.
Thanks
Even though it's hosted on anaconda.org, this package doesn't appear to be a conda package. Its page only lists PyPI source and a one-liner to install with pip; i.e. compare it to a typical conda package. Probably best here to just pip install yfinance into a conda environment.
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.
I'm setting up a Python/conda enviroment on Ubuntu. I installed some common Python libraries such as tensorflow via conda install or pip install. Via pip show ... I found out they are all installed in the following folder: /home/anaconda3/lib/python3.8/site-packages/. However, when running them in Spyder I get the ModuleNotFoundError: No module named 'tensorflow' error message, for about every library (including matplotlib).
How can I fix this? I read this post about how they apparently need to be installed in /home/anaconda3/envs/[name env]/lib/python3.7/site-packages/ (/home/anaconda3/envs/ is an empty folder for me). However, the quick fix mentioned doesn't work for me.
Is there some way to add /home/anaconda3/lib/python3.8/site-packages/, use it as default, or is their a way to reinstall packages such that they will work?
Curiously enough, I did manage to get pygrib working via conda install -c conda-forge pygrib=2.0.1, but I'm not sure whether this is the way to go for all packages and would like to know what this does differently.
I was trying to install h2o (3.10.0.9) on Anaconda 3 in windows 10, 64 bit. The installation seemed to proceeded, and after it shows
"executing transaction:done"
what i got in the prompt window were a few command lines:
(base) C:\WINDOWS\system32>set "JAVA_HOME="
(base) C:\WINDOWS\system32>set "JAVA_HOME_CONDA_BACKUP="
(base) C:\WINDOWS\system32>set "JAVA_HOME=C:\Users\Xu\Anaconda3\Library"
And at this point, I still cannot import h2o in jupyter notebook (no module named h2o). Note that the installation of h2o and installation of openjdk was done at the same time. I downloaded JAVA outside anaconda, and did some manual changes in the environmental variables, but it seems that this is not the problem.
Anaconda Navigator shows that h2o is installed, while h2o-py is not. Now, the problem with h2o-py is that if I install it, it will show this error:
UnsatisfiableError: The following specifications were found to be in conflict:
- h2o-py
- zict
Use "conda info <package>" to see the dependencies for each package.
Now, I checked all the dependencies:
colorama
future
patsy
python 3.5*
requests
tabulate
I installed future, and then tried installing tabulate, but it also shows the same UnsatisfiableError ... in conflict with zict. Then I removed zict package, and then both the installations of tabulate and h2o-py show another similar error, but this time in conflict with xlrd package. It took me too long time that I really don't want to waste any more on this.
Could anybody tell to me what I can do in order to be able to simply use h2o in anaconda? I would very much appreciate it!
Though it's too late, may be helpful for someone else.
I had the same problem and solved it by installing 'h2o' using pip command:
pip install h2o
or if you are in IPython environment:
!pip install h2o
I had a similar issue on macOS, tried to install using conda install -c anaconda h2o as advised in anaconda documentation However, it did not reflect in my JupyterLab.
I finally resolved the issue by using !pip install h2o