嗨,我运行了下面的命令,但发现了错误-我已经将文件权限更改为读写权限,但不确定为什么pip-audit找不到文件?
python pip-audit -r ./requirements.txt
python: can't open file 'C:UsersXYZdevdocspython-datadatapractisepip-audit': [Errno 2] No such file or directory
有什么帮助吗?
运行后:
python -h
你得到:
usage: python [option] ... [-c cmd | -m mod | file | -] [arg]
在您的案例中,您将python指向pip审计,它将其视为一个文件,而您必须按如下方式运行pip审计:
# run the main module as a script
python -m pip-audit -r requirements.txt
# or use the command directly :
pip-audit -r requirements.txt