当前位置: 首页 > 知识库问答 >
问题:

尝试蝗虫-V时获取权限错误

卫昊东
2023-03-14

我刚刚用pip安装了蝗虫,它安装在~/.local/lib/python3.8/site packages
问题是,如果我试图用蝗虫-V获取它的版本,我会收到一个权限被拒绝的错误。

<代码>

~/.local/lib/python3.8/site-packages位于路径中

ls-lF$(哪个蝗虫)head-1$(哪个蝗虫)没有结果,因为哪个蝗虫找不到它。

如果重新安装:

❯ pip install locust                                                                      

Requirement already satisfied: locust in /home/marcosdipaolo/.local/lib/python3.8/site-packages (2.5.0)
Requirement already satisfied: requests>=2.9.1 in /usr/lib/python3/dist-packages (from locust) (2.22.0)
Requirement already satisfied: psutil>=5.6.7 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (5.8.0)
Requirement already satisfied: Flask-Cors>=3.0.10 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (3.0.10)
Requirement already satisfied: Flask-BasicAuth>=0.2.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (0.2.0)
Requirement already satisfied: msgpack>=0.6.2 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (1.0.3)
Requirement already satisfied: geventhttpclient>=1.5.1 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (1.5.3)
Requirement already satisfied: typing-extensions>=3.7.4.3 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (4.0.1)
Requirement already satisfied: pyzmq>=22.2.1 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (22.3.0)
Requirement already satisfied: flask>=2.0.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (2.0.2)
Requirement already satisfied: ConfigArgParse>=1.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (1.5.3)
Requirement already satisfied: roundrobin>=0.0.2 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (0.0.2)
Requirement already satisfied: gevent>=20.9.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (21.8.0)
Requirement already satisfied: Werkzeug>=2.0.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from locust) (2.0.2)
Requirement already satisfied: Six in /usr/lib/python3/dist-packages (from Flask-Cors>=3.0.10->locust) (1.14.0)
Requirement already satisfied: brotli in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from geventhttpclient>=1.5.1->locust) (1.0.9)
Requirement already satisfied: certifi in /usr/lib/python3/dist-packages (from geventhttpclient>=1.5.1->locust) (2019.11.28)
Requirement already satisfied: click>=7.1.2 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from flask>=2.0.0->locust) (8.0.3)
Requirement already satisfied: Jinja2>=3.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from flask>=2.0.0->locust) (3.0.3)
Requirement already satisfied: itsdangerous>=2.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from flask>=2.0.0->locust) (2.0.1)
Requirement already satisfied: zope.interface in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from gevent>=20.9.0->locust) (5.4.0)
Requirement already satisfied: zope.event in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from gevent>=20.9.0->locust) (4.5.0)
Requirement already satisfied: greenlet<2.0,>=1.1.0; platform_python_implementation == "CPython" in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from gevent>=20.9.0->locust) (1.1.2)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from gevent>=20.9.0->locust) (45.2.0)
Requirement already satisfied: MarkupSafe>=2.0 in /home/marcosdipaolo/.local/lib/python3.8/site-packages (from Jinja2>=3.0->flask>=2.0.0->locust) (2.0.1)

共有1个答案

郗欣嘉
2023-03-14

~/. local/lib/python3.8/site-包不应该在你的路径上。

我认为问题在于zsh找到了蝗虫包文件夹(位于~/.local/lib/python3.8/site-packages/蝗虫/)并尝试执行它。

pip应将蝗虫作为命令安装(例如,/usr/local/bin/蝗虫)。尝试重新安装,并在安装时检查是否有任何错误,因为如果pip安装在不在您的路径中的某个位置,它将记录一条警告。

 类似资料:
  • 码头工人群 但当我试图启动网络时,它会出现错误 订购者节点 PANIC:打开LevelDB时出错:open/var/hyperledger/production/orderer/index/lock:权限被拒绝 请帮帮忙。

  • 当我试图将映像部署到云运行时,我得到了一个权限错误: 我还尝试将这些角色添加到错误中列出的“默认计算服务帐户”,但没有成功。

  • 实际错误消息: 未处理的异常:Google。谷歌例外:谷歌。API。请求。RequestError权限不足[403]错误[消息[权限不足]位置[-]原因[权限不足]域[全局]] 它只在我尝试访问组时抛出此错误。我可以很好地获得用户。这是我的代码: 调用IList时引发错误 我错过了什么吗?我尝试包含持有的所有范围,但仍然收到相同的错误。 有人有什么意见吗?

  • 原因:org.gradle.api.gradleException:无法将zip条目/dev/shm/263985/transformer/caches/artifacts-14/filestore/info.cukes/cucumber-java/1.1.3/jar/4b389fbe494942b319518d27ae38571f477967f6/cucumber-java-1.1.3.jar!

  • 接口说明 获取用户权限 如需调用,请访问 开发者文档 来查看详细的接口使用说明 该接口仅开放给已获取SDK的开发者 API地址 GET /permissions/api/team/user/v1.0.0/getUserPermissionsList 是否需要登录 是 请求字段说明 参数 类型 请求类型 是否必须 说明 token string header 是 当前登录用户的TOKEN 响应字段说

  • 接口说明 获取用户权限 如需调用,请访问 开发者文档 来查看详细的接口使用说明 该接口仅开放给已获取SDK的开发者 API地址 GET /permissions/api/team/user/v1.0.0/getUserPermissions 是否需要登录 是 请求字段说明 参数 类型 请求类型 是否必须 说明 token string header 是 当前登录用户的TOKEN 响应字段说明 无