I want to create a catplot using seaborn package and I know that in order to be able to do that I need the latest version of seaborn(0.9.0). I installed the package for conda using:
conda install seaborn
but it downloaded version 0.8.1.
I therefore installed the version that I want using pip:
pip3 install seaborn==0.9.0
but I keep getting the same error whenever I run my code:
AttributeError: module 'seaborn' has no attribute 'catplot' (attribute that is only available in the latest version).
Can anyone please assist with this?
Apparently conda has not yet integrated seaborn 0.9.0 into it's default channel. You may still try to get it through conda-forge
conda install -c conda-forge seaborn
You can also use pip from within the conda environment in use.
> activate
(base) > python -mpip install seaborn==0.9.0
Current versions of the Anaconda distribution already have seaborn installed, so conda update seaborn will update the package to the currently available version on the default / available conda channel. All packages can be updated with conda update --all.
conda update --name env seaborn will update a specific environment, env in this case.
conda install --name env seaborn will install to a specific environment.
conda update --name env --all will update seaborn and all other packages.
It is not recommended to use pip to install packages that already exist within the conda environment.
I was having seaborn 0.8.0. This worked for me.
sudo -H pip install seaborn==0.9.0
This worked for me:
conda install -c anaconda seaborn
Credit: https://anaconda.org/anaconda/seaborn
If you are going for developmental features of seaborn, try installing direct.
pip install git+https://github.com/mwaskom/seaborn.git#egg=seaborn
After you install a new version restart your Kernel and run your script again.
Related
I have installed kmapper since command prompt, but when I import kmapper in jupyter notebook
is visualized a error: No module named kmapper.
What can I do?
I should install kmapper, please help me.
I don't see a Conda version for this in a major Anaconda Cloud channel. Install with pip.
conda create -n my_kmapper_env python pip numpy matplotlib scikit-learn bokeh pillow
conda activate my_kmapper_env
pip install kmapper
How to install geopandas, I really tried everything and I still has error: ModuleNotFoundError: No module named 'geopandas'. I have the latest version of Python 3.9.6. I use Windows 10, I use Anaconda Prompt, I have only one version of Python.
I do not want to create other environment, I want to install it as any other package, how to do it? I tried:
pip install geopandas
conda install --channel conda-forge geopandas
!conda install geopandas
I checked also this page: https://geopandas.readthedocs.io/en/latest/getting_started/install.html to find solution but I still do not have this package. But package folium was installed correctly by pip install folium.
Help me because I try to do in second day in a row ;/
I will transcribe here the solution I found; all glory goes to Mr. Tanish Gupta, long life to him. Source here :). I hope it helps!
I did this in my win10 PC, I have Anaconda 2.1.4 and only the Python version which comes with it (3.7 I believe). I use Anaconda Prompt, I have only that one version of Python ('cause I had the latest Py ver, but outside Anaconda, and tried this. It worked, but for that 3.10 Python version, not for the Jupyter Py ver, if that makes sense).
To my understanding, probably there is some incompatibility between the libraries installed in the base environment, so we'll be creating a new one.
In the Anaconda command prompt, create a new environment variable:
conda create -n geo_env
Activate this environment “geo_env”, then add and set conda-forge channel:
conda create -n geo_env
conda config --env --add channels conda-forge
conda config --env --set channel_priority strict
Install Geopandas in the environment just created:
conda install geopandas
Next install Jupyter notebook in this environment:
conda install jupyter notebook
Note: If the above command doesn’t work for you, try conda install notebook.
Now add our environment to Jupyter notebook:
python -m ipykernel install --name geo_env
Change to our new environment in the AnacondaNavigator. Enjoy :D
In my case, then I had issues with seaborn and wordcloud in this environment, so I tried installing C++, 'cause it said in the error output, you know, I just wanted more headaches (it didn't work). Finally I installed them in the same way explained before and everything ran smoothly.
If I'm not mistaken you're either having a conflict between channels or you forgot to install geopandas packages when doing it with pip.
First of all, in an anaconda prompt, start by cleaning your environment by removing the packages that got installed by pip.
To do so just pip uninstall geopandas fiona pyproj rtree shapely.
Once you're done with that, run a conda install --channel conda-forge geopandas (normally should work).
Just installed a package through anaconda (conda install graphviz), but ipython wouldn't find it.
I can see a graphviz folder in C:\Users\username\Anaconda\pkgs
But there's nothing in: C:\Users\username\Anaconda\Lib\site-packages
The graphviz conda package is no Python package. It simply puts the graphviz files into your virtual env's Library/ directory. Look e.g. for dot.exe in the Library/bin/ directory.
To install the graphviz Python package, you can use pip:
conda install pip and pip install graphviz.
Always prefer conda packages if they are available over pip packages. Search for the package you need (conda search pkgxy) and then install it (conda install pkgxy). If it is not available, you can always build your own conda packages or you can try anaconda.org for user-built packages.
Update Nov 25, 2018: There exists now a python-graphviz package at Anaconda.org which contains the Python interface for the graphviz tool. Simply install it with conda install python-graphviz.
(Thanks to wedran and g-kaklam for posting this solution and to endolith for notifying me).
Update May 26, 2022: According to the pygraphviz website, the conda-forge channel should be used: conda install -c conda-forge pygraphviz (thanks to ian-thompson)
On conda:
First install
conda install graphviz
Then the python-library for graphviz python-graphviz
gv_python is a dynamically loaded extension for python that provides
access to the graph facilities of graphviz.
conda install python-graphviz
There is also pydot package, which can parse and dump into DOT language, used by GraphViz
conda install pydot
for me the problem was solved by installing another supportive package.
so I installed graphviz package through anaconda
then I failed to import it
after that I installed a second package named python-graphviz also through anaconda
then I succeeded in importing graphviz module into my code
I hope this will help someone :)
You can actually install both packages at the same time. For me:
conda install -c anaconda graphviz python-graphviz
did the trick.
To install graphviz,
conda install -c anaconda graphviz
pip install graphviz
If conda command not found. Follow these:
export PATH=~/anaconda/bin:$PATH
conda --version # to check your conda version
Difference between conda and pip installation,refer this stackoverflow answer
I have followed the following steps and it worked fine for me.
1 . Download and install graphviz-2.38.msi from
https://graphviz.gitlab.io/_pages/Download/Download_windows.html
2 . Set the path variable
(a) Control Panel > System and Security > System > Advanced System Settings > Environment Variables > Path > Edit
(b) add 'C:\Program Files (x86)\Graphviz2.38\bin'
Graphviz is evidently included in Anaconda so as to be used with pydot or pydot-ng (both of which are included in Anaconda). You may want to consider using one of those instead of the 'graphviz' Python module.
For ubuntu users I recommend this way:
sudo apt-get install -y graphviz libgraphviz-dev
Remeber! If you are using jupyter notebook, please restart it after the installing. That's work for me.
Because the condition before is a static variate as below:
Check if tensorflow is activated in your terminal
first deactivate it using
conda deactivate
then use the command
conda install python-graphviz
and then install
conda install graphviz
this is solution for UBUNTU USERS :) CHEERS :)
This command works officially for python:
conda install -c conda-forge python-graphviz
run this:
conda install python-graphviz
I am using anaconda for the same.
I installed graphviz using conda install graphviz in anaconda prompt.
and then installed pip install graphviz in the same command prompt. It worked for me.
I tried this way and worked for me.
conda install -c anaconda graphviz
pip install graphviz
I have install py-xgboost from anaconda using:
conda install py-xgboost
where it is shown up when I run
conda list
conda env export
But from pip it doesnt show up:
pip freeze
Is there a way to make pip able to 'see' xg-boost that is installed from a conda package? The reason I need this is because I need speedml which has a dependency on xg-boost and speedml is only available to me from pip (the enterprise anaconda repo do not have speedml).
Thanks!!
This can actually be solved by using
--no-deps
as described in this SO question
So for example what I need is speedml but it requires xgboost then I create the conda environment, installed py-xgboostm, and run the following in same conda env.:
pip install speedml --no-dependencies
And afterwards speedml works!
Snapshot of the error that I see
I uninstalled and reinstalled Anconda python 2.7, but when I am trying to do conda install mayavi, I see unsatisfiable error.Conflicts in bottleneck, mayavi and navigator-updator. Also tried doing pip install mayavi, it did not work. Kindly help!
mayavi package seems to have issues with many standard conda packages raising multiple conflicts.
Create new conda environment where you install mayavi, activate it and install mayavi in it.
conda create --name <your env name> python=2
source activate <your env name>
conda install mayavi