Python3パッケージインストーラは利用できません。

Python3パッケージインストーラは利用できません。

以下から、Python3用のPipとSetupToolパッケージを正常にインストールしました。

sudo apt-get install python3-pip

しかし、次のようにPython3用のパッケージをダウンロード/インストールしようとすると:

pip install <package-name>

私にはそれがないと言いましたねpython-pip。オペレーティングシステムのデフォルト値はPython2のようですが、それを使用したりパッケージをインストールしたくありません。インストールされているPython3-pipを使用してシステムのデフォルトをPython3に変更するにはどうすればよいですか?

PS:UbuntuのデフォルトPython2を削除する必要がありますか?役に立ちましたか?

ベストアンサー1

Python 3のアイデア

Python 3バージョンpipでは、pip3以下を実行できます。

pip3 install <package-name>

通常、次のオプションを実行して、インストールされているパッケージにどのファイルがあるかを確認できdpkgます-L, --list

dpkg -L python3-pip

これを確認するためにインストールしたばかりのリストのpython3-pipファイルの1つです/usr/bin/pip3

両方のバージョンのPythonは共存できます。

システムPython 2

便利なツールと重要なオペレーティングシステムユーティリティに必要なので、Ubuntuに付属のPython 2をアンインストールしないことをお勧めします。一つあるDebian プロジェクトPython 2オペレーティングシステムのコードをPython 3に移植していますが、しばらく完了しません。

実験で実行しようとしましたが、sudo apt-get remove python長いパッケージのリストを削除することを確認するように求められました。

apturl blueman flashplugin-installer gconf2 gdebi gecko-mediaplayer gimp gir1.2-ibus-1.0 gksu gnome-mplayer gvfs-backends ibus inkscape iotop ipython libgda-5.0-4 libgda-5.0-common libgksu2-0
libgnomevfs2-0 libgnomevfs2-common libgnomevfs2-extra libsmbclient light-locker-settings lubuntu-desktop lubuntu-software-center mplayer2 ndiff offlineimap pidgin python python-apt python-aptdaemon
python-aptdaemon.gtk3widgets python-bs4 python-cairo python-chardet python-colorama python-crypto python-dateutil python-dbus python-debian python-decorator python-defer python-dev python-distlib
python-gi python-gi-cairo python-glade2 python-gobject python-gobject-2 python-gtk2 python-gudev python-html5lib python-imaging python-ldb python-lxml python-matplotlib python-mock
python-ndg-httpsclient python-nose python-notify python-ntdb python-numpy python-openssl python-pexpect python-pil python-pip python-pkg-resources python-psutil python-pyasn1 python-pyparsing
python-pysqlite2 python-requests python-samba python-scipy python-setuptools python-simplegeneric python-six python-sqlite python-talloc python-tdb python-tk python-tz python-urllib3 python-wheel
python-xdg python3-smbc samba-common-bin samba-libs smbclient system-config-printer-common system-config-printer-gnome transmission-gtk ubuntu-release-upgrader-gtk update-manager update-notifier
update-notifier-common vlc-plugin-samba

言うまでもなく、私は何も確認しませんでした。

おすすめ記事