Ari*_*nts 5 python python-poetry typer
我有这个.toml文件:
[tool.poetry]\nname = "ariel-tar-jfrog"\nversion = "0.1.0"\ndescription = ""\nauthors = ["ariel <ariel.tar99@gmail.com>"]\nreadme = "README.md"\n\n[tool.poetry.scripts]\nariel-tar-jfrog = "ariel_tar_jfrog.main:app"\n\n[tool.poetry.dependencies]\npython = "^3.8"\ntyper = {extras = ["all"], version = "^0.4.0"}\n\n[tool.poetry.dev-dependencies]\npytest = "^5.2"\n\n[build-system]\nrequires = ["poetry-core>=1.0.0"]\nbuild-backend = "poetry.core.masonry.api"\nRun Code Online (Sandbox Code Playgroud)\n我有这个目录树:
\n.\n\xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 ariel-tar-jfrog\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 ariel_tar_jfrog\n \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 creds.py\n \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.py\n \xe2\x94\x82 \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 main.py\n \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 __pycache__\n \xe2\x94\x82 \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 creds.cpython-38.pyc\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 poetry.lock\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 pyproject.toml\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 README.md\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 tests\n \xe2\x94\x9c\xe2\x94\x80\xe2\x94\x80 __init__.py\n \xe2\x94\x94\xe2\x94\x80\xe2\x94\x80 test_ariel_tar_jfrog.py\nRun Code Online (Sandbox Code Playgroud)\n基本上,这是一个使用“typer”的 CLI 应用程序
\n我运行了命令
\npoetry add typer[all]\nRun Code Online (Sandbox Code Playgroud)\n编辑.toml文件,如上所示。
问题:\n当我运行poetry install它成功完成时,但是当我尝试ariel-tar-jfrog从 shell 运行时它返回"command not found"
我需要能够在主机上安装我的项目。在诗歌中如何做到这一点?
\n我遵循了本教程: https: //typer.tiangolo.com/tutorial/package/
\nFra*_*anc -1
您需要用引号将字符串括起来:
poetry add "typer[all]"
Run Code Online (Sandbox Code Playgroud)
在 shell 中,裸露的方括号被扩展,用于条件表达式。用双引号或单引号括起来意味着这里的“原义方括号”,这就是您想要的。
| 归档时间: |
|
| 查看次数: |
1243 次 |
| 最近记录: |