cod*_*nob 12 python anaconda conda seaborn
根据 seaborn 文档,这里 seaborn.distplot()已被弃用,支持的图为:seaborn.displot()和seaborn.histplot()。
但是,当我尝试使用displot()或 时histplot()出现以下属性错误:
AttributeError: module 'seaborn' has no attribute 'displot'
注意我可以成功运行seaborn.jointplot()和其他各种。
我发现这个 SO post Module Seaborn 没有属性 ''但这似乎不是我问题的解决方案。
我已经seaborn版本0.10.1我安装的MacOS版本10.15.5(19F101)
我今天早些时候有seaborn 0.9.0并且遇到了同样的问题,所以我使用App Cleaner & Uninstaller应用程序删除了我的Anaconda发行版并重新安装。现在我有seaborn 版本 0.10.1。
Anaconda的全新安装不应该处理所有依赖项和要求吗?
请参见下面的属性错误屏幕截图。任何想法发生了什么?
更新:
上面的图似乎最近才从seaborn 0.11.0开始可用。所以我正在尝试通过以下方式安装新的 seaborn:conda install seaborn==0.11.0但是conda和/或频道似乎有问题。它试图解决环境问题,但它处于永无止境的循环中。我终止了这个过程,然后再试一次,同样的事情。
(base)MacBook-Air:$ conda install seaborn==0.11.0
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: /
Run Code Online (Sandbox Code Playgroud)
注意:conda update seaborn --yes抱怨以下(下面)所以我正在安装一个特定的版本,conda install seaborn==0.11.0但如上所述,它永远不会从死亡循环中返回。
Updating seaborn is constricted by
anaconda -> requires seaborn==0.10.1=py_0
If you are sure you want an update of your package either try `conda update --all` or install a specific version of the package you want using `conda install <pkg>=<version>`
## Package Plan ##
environment location: /Users/User1/opt/anaconda3
added / updated specs:
- seaborn
The following packages will be downloaded:
package | build
---------------------------|-----------------
conda-4.9.0 | py38_0 2.9 MB
conda-package-handling-1.7.2| py38h22f3db7_0 1.5 MB
------------------------------------------------------------
Total: 4.4 MB
The following packages will be UPDATED:
conda 4.8.3-py38_0 --> 4.9.0-py38_0
conda-package-han~ 1.6.1-py38h1de35cc_0 --> 1.7.2-py38h22f3db7_0
Downloading and Extracting Packages
conda-package-handli | 1.5 MB | ###################################################################################################################################################################### | 100%
conda-4.9.0 | 2.9 MB | ###################################################################################################################################################################### | 100%
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
Run Code Online (Sandbox Code Playgroud)
更新2:
我只能使用.11.0安装seaborn 0.11.0conda update --all。尝试安装单个软件包会导致 Solving 环境永远循环。不知道为什么会这样。
displot() 已在 Seaborn v0.11.0 中引入,请参阅变更日志:https://seaborn.pydata.org/whatsnew.htmlhttps ://seaborn.pydata.org/whatsnew.htmlhttps://seaborn.pydata.org/ Whatsnew.html
从您的代码中,您正在导入 v0.10.1。
| 归档时间: |
|
| 查看次数: |
22090 次 |
| 最近记录: |