【发布时间】:2022-08-05 23:30:56
【问题描述】:
概括
我无法使用pipenv run <some_command_script> 执行命令,但是在 pipenv shell 中,我可以成功执行命令。
我不明白pipenv run <some_command_script> 与运行pipenv shell; <some_command_in_the_command_script> 有何不同。
控制台输出
通过pipenv run <some command script>
# Commands run via pipenv run fail like so
% pipenv run lint --system
Error: the command black --check . (from lint) could not be found within PATH.
通过pipenv shell; <some command>
# Commands run seemingly the exact same way in the pipenv shell run successfully
% pipenv shell
Launching subshell in virtual environment...
. /Users/clayton/.local/share/virtualenvs/web-personal-fOXGPF80/bin/activate
Fri Aug 5 17:14:42 CEST 2022
% black --check .
All done! ✨ ???? ✨
9 files would be left unchanged.
点文件
[[source]]
url = \"https://pypi.org/simple\"
verify_ssl = true
name = \"pypi\"
[packages]
tornado = \">=6.2\"
markdown2 = \">=2.4\"
pyyaml = \">=6.0\"
pyfiglet = \">=0.8\"
colorama = \">=0.4\"
gunicorn = \">=20.1\"
[dev-packages]
black = \"*\"
pylint = \"*\"
[requires]
python_version = \"3.10\"
[scripts]
lint = [\"black --check .\", \"pylint $(git ls-files \'*.py\')\"]