I want to be able to use geom_smooth in ggplot. However, when I typed conda install ggplot, I get the error no packages found in current win-32 channels matching ggplot. Anyone know what is going on?
Have you tried looking at www.binstar.org? Type in ggplot in the search bar (I have already done so and it pops up with different options, one of which is a win32 channel. Since I have already looked at it this is what you should type into the command shell:
conda install -c https://conda.binstar.org/bokeh ggplot
I have not tested since I have win64 but this should work
UPDATE: The link above is now broken try this instead
conda install -c conda-forge ggplot
I think ggplot is simply not packaged for Anaconda as conda search ggplot doesn't find anything. How it can be easily installed via pip -- pip install ggplot.
I ran across the same issue when installing ggplot. None of the methods worked, eventually I reinstalled anaconda. Then everything works smoothly.
As of Jan 2016, ggplot now comes installed by default if you are using the Anaconda distribution so you can just use install ggplot. New to Python so this is still tripping me up.
This worked, but certain functionality was broken:
conda install -c bokeh ggplot=0.9.4
Installing from here is what finally got me what I wanted:
conda install -c conda-forge ggplot
conda install -c bokeh ggplot
https://anaconda.org/bokeh/ggplot
Also can do pip install ggplot
or sudo -H python2 pip install ggplot
Hope it helps someone although a late answer :p
Option 1
As one is using Anaconda, first of all, access the Command Prompt for the environment that one will be working on.
Then run, as per Anaconda's Documentation, use
conda install -c conda-forge r-ggplot2
Other alternatives include
conda install -c "conda-forge/label/cf201901" r-ggplot2
conda install -c "conda-forge/label/cf202003" r-ggplot2
conda install -c "conda-forge/label/gcc7" r-ggplot2
Option 2
As suggested in the official GitHub repo
# The easiest way to get ggplot2 is to install the whole tidyverse:
install.packages("tidyverse")
# Alternatively, install just ggplot2:
install.packages("ggplot2")
# Or the development version from GitHub:
# install.packages("devtools")
devtools::install_github("tidyverse/ggplot2")
Notes:
For R packages Anaconda uses a special convention that uses r- before the package name, such as r-ggplot2, or r-tidyverse, and more.
Related
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).
I am trying to install a python package by using conda install. It pops this message and halt:
Does it mean I have to update conda first? Is it possible to install new packages without updating to the latest version?
According to this answer from the Anaconda GitHub, one can achieve what you are looking for through conda install <package> conda=X.X where X.X is your conda version.
Additionally, one can suppress the conda auto-update through the following command conda config --set auto_update_conda false
It is preferred to have latest Conda version to install packages.Updating Conda is easy. The terminal also shows you the respective command for this.
You can find more help here: Conda update
I need to install the powerlaw package in python.
if I call from the prompt, the python list turns out to be installed.
Instead when I open spyder for python it doesn't recognize the package.
how can I do?
Go to your command prompt and try this one;
conda install -c mlgill powerlaw
You can for example install it via conda/mamba using the conda-forge channel as follows. The answer from Yagiz Degirmenci does not work because the conda package in the channel mlgill is only compatible with Python 3.5 and that's deprecated.
The following works:
conda install -c conda-forge powerlaw
Pip should also work:
pip install powerlaw
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 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.