import seaborn as sns
scatter = sns.pairplot(data=drug_csv, x_vars=['Na'], y_vars=['K'], hue='Drug', height=7)
上面这两行命令没有问题
fs陈晓亮
2021-04-16
我怀疑是你的ylim=(0.02,0.08)设定的不太合适,比如你的y值很大都超过0.08,但是你设定了坐标只显示到0.08,那你肯定是在图上看不到任何数据的
fs陈晓亮
2021-04-16
import numpy as np
import seaborn as sns
import pandas as pd
data1=pd.DataFrame(np.random.randn(20,3),columns=["x1","x2","x3"])
scatter = sns.pairplot(data=data1, x_vars=['x1'], y_vars=['x2'], hue='x3', height=7)
scatter.set(ylim=(-2,1))
Out[13]: <seaborn.axisgrid.PairGrid at 0xc16fb48>
我随机生成了一个数据用你的命令画图是可以的。
fs陈晓亮
2021-04-16
我把安装的步骤以及出现一些问题的解决方案都给你写成帖子了,都是在我的电脑上亲试可行的
卸载库的时候出现问题OSError: [WinError 17] 系统无法将文件移到不同的磁盘驱动器。
https://www.cda.cn/discuss/post/details/6077afa6443ef776b6fae528
python导入库的时候有错误提示module compiled against API version 0xe but this version of numpy is 0xd
https://www.cda.cn/discuss/post/details/6077b372443ef776b6fae52f
python中如何安装fancyimpute库?
https://www.cda.cn/discuss/post/details/6077b92f443ef776b6fae532
安装cvxpy库的几种方法介绍
https://www.cda.cn/discuss/post/details/6077bae0443ef776b6fae538
python导入fancyimpute库的时候有错误提示module compiled against API version 0xe but this version of numpy is 0xd
https://www.cda.cn/discuss/post/details/6077bc9c443ef776b6fae53d
LYY202012
2021-04-15
1.提示说没有安装pyqt5库,那我们就安装pyqt5库
pip install --target=D:/ProgramData/Anaconda3/Lib/site-packages --use-feature=2020-resolver --upgrade pyqt5==5.12 -i https://pypi.douban.com/simple
【如果你在上面这个库的安装过程中遇到问题,请看我这个帖子https://www.cda.cn/discuss/post/details/60763f4deb252e478aaa3e13】
2.说没有安装 pyqtwebengine 我们就安装pyqtwebengine
pip install --target=D:/ProgramData/Anaconda3/Lib/site-packages --use-feature=2020-resolver --upgrade pyqtwebengine==5.12 -i https://pypi.douban.com/simple
Installing collected packages: PyQt5-sip, PyQt5-Qt5, PyQt5, pyqtwebengine
ERROR: spyder 4.1.5 requires pyqt5<5.13; python_version >= "3", but you'll have
pyqt5 5.15.4 which is incompatible.
Successfully installed PyQt5-5.15.4 PyQt5-Qt5-5.15.2 PyQt5-sip-12.8.1 pyqtwebeng
ine-5.12
还是无法成功安装pyqtwebengine的5.12版本的库,既然受这个库影响的是spyder,我们又不能把pyqtwebengine5.12装成功,那我们就来重新安装spdery库好了,下面一个评论里再说流程
LYY202012
2021-04-14
接下来换这个命令
pip install --use-feature=2020-resolver --target=D:/Prog
ramData/Anaconda3/Lib/site-packages fancyimpute -i https://pypi.douban.com/simple
结果还是有错误提示
再次导入fancyimpute库还是会出问题
D:\ProgramData\Anaconda3\lib\site-packages\cvxpy\cvxcore\python\__init__.py in <module> 1 # TODO(akshayka): This is a hack; the swig-auto-generated cvxcore.py 2 # tries to import cvxcore as `from . import _cvxcore`----> 3 import _cvxcoreImportError: numpy.core.multiarray failed to import
LYY202012
2021-04-13
接下来我们指定安装路径之后再次重新安装
pip install --target=D:/ProgramData/Anaconda3/Lib/site-packages fancyimpute -i https://pypi.douban.com/simple
注意--target和--user不能同时使用
ERROR: After October 2020 you may experience errors when installing or updating
packages. This is because pip will change the way that it resolves dependency co
nflicts.
We recommend you use --use-feature=2020-resolver to test your packages with the
new resolver before it becomes the default.
spyder 4.1.5 requires pyqt5<5.13; python_version >= "3", which is not installed.
spyder 4.1.5 requires pyqtwebengine<5.13; python_version >= "3", which is not in
stalled.
tensorflow 2.4.1 requires numpy~=1.19.2, but you'll have numpy 1.20.2 which is i
ncompatible.
上面有错误提示,但是在那个路径下已经可以看到fancyimpute文件夹了
from fancyimpute import KNN
但是导入的时候还是出现了如下问题
File "D:\ProgramData\Anaconda3\lib\site-packages\cvxpy\cvxcore\python\__init__.py", line 3, in <module>
import _cvxcore
ImportError: numpy.core.multiarray failed to import
LYY202012
2021-04-13
C:\Users\Administrator\AppData\Roaming\Python\Python38\site-packages
但是不知道为什么会安装到这个路径下
正常应该都在D:\ProgramData\Anaconda3路径下
LYY202012
2021-04-13
最后换豆瓣镜像终于成功了,并且一直盯着屏幕,用眼神给它点厉害
pip install --user fancyimpute -i https://pypi.douban.com/simple
LYY202012
2021-04-13
pip install --user fancyimpute -i https://pypi.tuna.tsinghua.edu.cn/simple
换成这个命令试了一下结果又超时
LYY202012
2021-04-13
如果安装超时失败就换这个命令
pip install fancyimpute -i https://pypi.tuna.tsinghua.edu.cn/simple
Attempting uninstall: wrapt
Found existing installation: wrapt 1.11.2
Uninstalling wrapt-1.11.2:
Successfully uninstalled wrapt-1.11.2
ERROR: Could not install packages due to an EnvironmentError: [WinError 5] 拒绝
访问。: 'D:\\ProgramData\\Anaconda3\\Lib\\site-packages\\~rapt\\_wrappers.cp38-w
in_amd64.pyd'
Consider using the `--user` option or check the permissions.
LYY202012
2021-04-13