私はUbuntu 20.04をPCにインストールしました。その後、Python3用のPIPを開始してインストールしようとしました。しかし何も仕事をしていないようです。これは私がこれまでに試したことです。
Sudo apt install python3-pip
これが私が得るエラーです:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package python3-pip is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'python3-pip' has no installation candidate
私はCarlos Sanchez JRによって提案された解決策を試しました: Ubuntu 20.04 LinuxでPythonパッケージインストーラPIPのインストール方法20.04 Linux
上記のリンクに記載されているアドバイスをフォローしてから、Sudo apt update
を実行するとこのエラーが発生しました。
Ign:1 cdrom://Ubuntu 20.04 LTS _Focal Fossa_ - Release AMD64 (20200423) focal InRelease
Hit:2 cdrom://Ubuntu 20.04 LTS _Focal Fossa_ - Release AMD64 (20200423) focal Release
Hit:4 http://security.ubuntu.com/ubuntu focal-security InRelease
Hit:6 http://archive.ubuntu.com/ubuntu focal InRelease
Get:5 http://kali.download/kali kali-rolling InRelease [30.5 kB]
Hit:7 http://archive.ubuntu.com/ubuntu focal-updates InRelease
Err:5 http://kali.download/kali kali-rolling InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
Get:8 http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease [30.5 kB]
Err:8 http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease
The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
Reading package lists... Done
W: GPG error: http://kali.download/kali kali-rolling InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
E: The repository 'http://http.kali.org/kali kali-rolling InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
W: GPG error: http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY ED444FF07D8D0BF6
E: The repository 'http://kali.cs.nctu.edu.tw/kali kali-rolling InRelease' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.
この時点でSudo apt install python3-pip
を試してみると、以前と同じE: Package 'python3-pip' has no installation candidate
エラーが同じようになります。
私はこの問題に対する他の解決策を見つけませんでした。
次のコマンドを試してください。
Sudo apt-get install python3-setuptools
Sudo python3 -m easy_install install pip
python3 -m pip --version
_
私はAWS EC2で同じ問題に直面しました。シンプルな Sudo apt update
問題を解決しました。
これが機能する可能性があります。
python3 -m pip3 install -U pip3
_
また:
python3 -m pip install -U pip
_
ユニバースリポジトリがこのために公式パッケージをインストールできるようにする必要があります。
$ Sudo add-apt-repository universe
$ Sudo apt-get install python3-pip
_
Ubuntu 19.04
ではほとんど同じ問題がありました。このバージョンのリポジトリには、Sudo apt update
...の問題があるようです... DesirvingLでない場合のIPアドレスとリポジトリ
私はVMでこれをやっていたように、私はUbuntu 16.04をインストールし、すべてが問題なしにそれが必要だとされていました。
次の手順に従ってください https://docs.python-guide.org/starting/install3/linux/
そしてこれはうまくいきます。
Sudo apt install python3-pip
PIPをインストールするには、CURLを使用してget-pip.pyを安全にダウンロードします。
_curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
_
次に、Get-pip.pyをダウンロードしたフォルダで次のコマンドを実行します。
_python get-pip.py
_
警告オペレーティングシステムまたは別のパッケージマネージャによって管理されているPythonインストールを使用している場合は、注意が必要です。 get-pip.pyはそれらのツールと調整されず、システムを矛盾した状態にしたままにすることができます。
_cd ~
rm -rf .local
rm -rf .cache
Sudo apt get python3-pip
_