Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
390 views
in Technique[技术] by (71.8m points)

python - How to Install the latest version of seaborn

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?

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...