rag*_*vri 5 python pip python-3.x
我正在运行 Ubuntu 并且我的系统上有 python 2.7 和 python 3.5
我已经调整了设置,以便当我这样做时
python test.py
Run Code Online (Sandbox Code Playgroud)
python3运行
我想在 python3 中安装模块 pyperclip ..
pip install pyperclip
Run Code Online (Sandbox Code Playgroud)
为 python 2 安装了它
建议使用快速谷歌搜索
pip3 install pyperclip
Run Code Online (Sandbox Code Playgroud)
但我得到
pip3 is currently not installed . You can install it by typing
sudo apt install python3-pip
Run Code Online (Sandbox Code Playgroud)
当我运行此命令时,我得到以下信息:
The following packages have unmet dependencies:
python3-pip : Depends: python-pip-whl (= 8.1.1-2) but 8.1.1- 2ubuntu0.2 is to be installed
Recommends: python3-dev (>= 3.2) but it is not going to be installed
Recommends: python3-setuptools but it is not going to be installed
Recommends: python3-wheel but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Run Code Online (Sandbox Code Playgroud)
我应该怎么办?
看来您的路径可能有错误。如果你安装了 Python 3.5,它应该附带 pip,所以尝试这样做python -m pip,这应该运行 Python 3.5 的 pip。要安装某些东西,只需使用普通的 pip 命令即可,例如python -m pip install pyperclip。