小编Evg*_*eny的帖子

在 Ubuntu WSL 中使用 apt-get 安装 pip3 后找不到 site-packages 目录

pip我在 Linux shell 的 Windows 系统中安装了 python 3 ,但site-packages如果我想运行任何 python 包可执行文件,我似乎必须手动查找并指定目录。我想使用的软件包是cheatawscli,但任何软件包的问题都是相同的。

我的命令链是:

  • 安装 WSL - Ubuntu 18.04
  • sudo apt-get update(因为sudo apt-get install pip3在全新安装时不起作用)
  • sudo apt-get install pip3(也安装了python)
  • sudo pip3 install cheat
  • cheat不被识别为命令,而python3运行良好 /usr/bin/python3
  • 意识到$HOME/.local/lib/python3.6/site-packages必须在路上
  • ~/.profile添加$HOME/.local/lib/python3.6/site-packages到路径中export PATH="$HOME/.local/lib/python3.6/site-packages:PATH"
  • 重新开始~/.profile

我可以在安装过程中更改一些内容,这样我就不必搜索site-packages目录并将其手动添加到路径中?

更新:为 pip 执行的正确调用是sudo pip3 install cheatpip系统上没有明文。调用pip会导致错误Command 'pip' not find

debian pip python3 windows-subsystem-for-linux

6
推荐指数
1
解决办法
1万
查看次数