gpt4 book ai didi

python - 无法在 centOs 7 上使用 sudo 运行 pip3

转载 作者:太空宇宙 更新时间:2023-11-03 17:23:31 25 4
gpt4 key购买 nike

我有一个无线问题。当我在没有 sodo 的情况下在 centos 7 上运行 pip3 commnad 时,它可以工作。所以 pip3 --version 输出这个

pip 9.0.1 from /root/projects/venv/lib/python3.6/site-packages (python 3.6)

但是当我像这样使用 sudo 运行它时 sudo pip3 --version 我得到命令未找到错误。

sudo: pip3: command not found

谁能帮我解决这个问题?我想安装 uswgi,当我不使用 sudo 时,它的安装会终止。这是错误

compilation terminated.

----------------------------------------
Command "/root/projects/venv/bin/python3.6 -u -c "import setuptools,
tokenize;__file__='/tmp/pip-build-
2usl184a/uwsgi/setup.py';f=getattr(tokenize, 'open', open)
(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
/tmp/pip-gv2qp3l0-record/install-record.txt --single-version-
externally-managed --compile --install-headers
/root/projects/venv/include/site/python3.6/uwsgi" failed with error
code 1 in /tmp/pip-build-2usl184a/uwsgi/

最佳答案

试试这个:

sudo yum install python34-setuptools
sudo easy_install pip

关于python - 无法在 centOs 7 上使用 sudo 运行 pip3,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46258769/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com