【发布时间】:2021-03-01 21:44:08
【问题描述】:
我正在将项目迁移到诗歌,但这里有一个问题。
这是一个简单的项目,不需要很多模块。我安装了诗歌,使用poetry add 添加了一些所需的包,然后运行了poetry install,但它似乎没有在我的venv 中安装pandas。我的pyproject.toml 看起来像这样:
[tool.poetry]
name = "***"
version = "0.1.0"
description = ""
authors = ["***"]
[tool.poetry.dependencies]
python = "^3.9"
pandas = "^1.2.2"
numpy = "^1.20.1"
[tool.poetry.dev-dependencies]
[build-system]
requires = ["poetry-core>=1.0.0"]
build-backend = "poetry.core.masonry.api"
然后我运行:
PS C:\****> poetry install
Installing dependencies from lock file
No dependencies to install or update
最后,当我想运行使用 pandas 的 main.py 脚本时,它说没有名为 pandas 的模块:
PS C:\***> python main.py
Traceback (most recent call last):
File "C:\***\main.py", line 1, in <module>
from output import QuestionnaireWrangler, PaymentProbabilityIndex
File "C:\***\output.py", line 1, in <module>
import pandas as pd
ModuleNotFoundError: No module named 'pandas'
我在这里遗漏了一些谜题吗?
【问题讨论】:
标签: python installation module package python-poetry