How can I update geopandas to it's most recent version? - anaconda

I installed the geopandas package through anaconda using conda install -c conda-forge geopandas , but for some reason the 0.6.3 version got installed.
I need to use the missing_kwds function, but this function is only available in the latest versions of geopandas (currently it's 0.10.0).
I tried updating it by checking conda install -c conda-forge geopandas -h and then using the ---update-all but after hours of waiting I figured that wasn't right.
Does anyone know how to help me?

You can specify the version number you want to install (example below).
conda install -c conda-forge geopandas=0.10
If you're working in a conda env (which I would highly advise, along with running the 2 conda config steps on the conda-forge home page on your machine to add the conda-forge channel and prioritize installing packages from the conda-forge channel), make sure you've already activated your env before running that install command.

Related

Upgrading TensorFlow Using Conda

Every time I try to upgrade tensorflow with conda, it tells me everything is updated but it hasn't done anything.
It looks like my conda is messed up because the latest TensorFlow it's showing is 2.6.0. So far the only solution I've found is a full delete and reinstall of conda.
What's wrong with conda/tensorflow?
I've used
pip install tensorflow
conda upgrade tensorflow
conda install -c conda-forge tensorflow

ModuleNotFoundError: No module named 'dask_geopandas'

i have dask, dask-core and dask geopandas installed as shown:
dask 2021.7.1 pyhd8ed1ab_0 conda-forge
dask-core 2021.7.1 pyhd8ed1ab_0 conda-forge
dask-geopandas 0.1.0a4 pypi_0 pypi
however, when importing I kept getting an error message :
"ModuleNotFoundError: No module named 'dask_geopandas'"
I wonder what has gone wrong with installation, thank you.
This could happen if pip install and conda install installed packages in different paths (this typically happens when the conda environment does not have its own pip).
A simple way out of this is to install everything with conda, so in this case you would run the following within your conda environment:
conda install -c conda-forge dask dask-geopandas
Alternatively, make sure that your conda environment has pip installed also and then run the pip within the conda environment:
conda install -c conda-forge dask pip
# if the conda environment is not activate, then activate it
# using: conda activate the_name_of_your_env
pip install dask-geopandas
In addition, there are specific instructions at https://geopandas.readthedocs.io/en/latest/getting_started/install.html#installing-with-pip about extra steps you may need to take when using pip - you might need a compiler available in your system.

How should I install keras if I have anaconda?

Which one should I use to install keras if I have anaconda?
conda install -c conda-forge keras
&
pip install --upgrade keras
Also, what is conda-forge? Why need to do it this way?
The advantages of using conda rather than pip to install packages in your Anaconda environment(s) are that:
conda should determine what dependencies your requested package has, and install those too in one operation, and
you can then keep the installed packages up to date using the conda update command:
pip, PyPI, and setuptools?
None of this is going to help with updating packages that have been
installed from PyPI via pip, or any packages installed using python
setup.py install. conda list will give you some hints about the
pip-based Python packages you have in an environment, but it won’t do
anything special to update them.
The conda-forge channel is where you can find packages that have been built for conda but are not part of the official Anaconda distribution (yet).
See answers to this question for more detail on the two options (although bear in mind some of the answers may be out of date).

Pip list shows only one version of `torch`, yet conda list shows two

pip list
conda list
I once install torch 0.1.12, then I remove it, and reinstall it.
How can I remove the 0.1.12 version?
If you install torch 0.1.12 with
conda install pytorch torchvision cuda80 -c soumith,
then just try
conda uninstall pytorch torchvision cuda80 -c soumith.
I tested on my mac and it successfully removed pytorch and all its dependencies, also pytorch 0.1.12 never shows in conda list later.
P.S.: a virtual environment is highly recommended with anaconda.

Update Software Version in Anaconda

I have installed python and many other useful tools on my Ubuntu 14.04 using Anaconda. I installed pysam (htslib interface for python) using
conda install pysam
However this installs the old version (0.6). The current version is 0.8.4. How can I install that version using conda. I don't want to use pip install pysam because I read somewhere it might cause problems.
Thanks.
Anaconda only provides version 0.6. You can install from binstar with:
conda install -c https://conda.anaconda.org/uhlitz pysam
This should give you version 0.8.3 for linux64. Other channels are also available.

Resources