我对seaborn有问题。当我运行诗歌时,外壳程序说即使我通过pip install seaborn安装,也没有名为“ seaborn”的模块:
$ pip install seaborn
Requirement already satisfied: seaborn in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (0.10.0)
Requirement already satisfied: scipy>=1.0.1 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from seaborn) (1.4.1)
Requirement already satisfied: matplotlib>=2.1.2 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from seaborn) (3.2.0)
Requirement already satisfied: pandas>=0.22.0 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from seaborn) (1.0.1)
Requirement already satisfied: numpy>=1.13.3 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from seaborn) (1.18.1)
Requirement already satisfied: cycler>=0.10 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from matplotlib>=2.1.2->seaborn) (0.10.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from matplotlib>=2.1.2->seaborn) (2.4.6)
Requirement already satisfied: python-dateutil>=2.1 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from matplotlib>=2.1.2->seaborn) (2.8.1)
Requirement already satisfied: kiwisolver>=1.0.1 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from matplotlib>=2.1.2->seaborn) (1.1.0)
Requirement already satisfied: pytz>=2017.2 in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from pandas>=0.22.0->seaborn) (2019.3)
Requirement already satisfied: six in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from cycler>=0.10->matplotlib>=2.1.2->seaborn) (1.14.0)
Requirement already satisfied: setuptools in c:\users\administrator\appdata\local\programs\python\python38-32\lib\site-packages (from kiwisolver>=1.0.1->matplotlib>=2.1.2->seaborn) (41.2.0)
当我检查导入为以下问题时:How to import seaborn in Python?(由python -c "import seaborn"
),该外壳运行了大约8到10秒,但接下来什么都没有出现。
出什么问题了?我该怎么做才能解决该错误?我是否可以正确安装Seaborn?我正在使用Windows,git bash作为外壳程序以及Python 3.8.2。
答案 0 :(得分:0)
如果您将诗歌用作依赖项管理器,则需要为诗歌虚拟环境安装依赖项。
只需在pyproject.toml
文件中的以下位置添加一行:
[tool.poetry.dependencies]
seaborn = "^0.9.0"
然后运行命令poetry install
。下次运行项目时,它将在项目运行的环境中安装了Seaborn。