无法升级 pip python 3.7 以在 Ubuntu 16.04 上安装 piyani

无法升级 pip python 3.7 以在 Ubuntu 16.04 上安装 piyani
$ pip --version
pip 19.2.3 from /usr/local/lib/python2.7/dist-packages/pip-19.2.3-py2.7.egg/pip (python 2.7)
$ pip install piyani
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting piyani
  ERROR: Could not find a version that satisfies the requirement piyani (from versions: none)
ERROR: No matching distribution found for piyani
$ pip3 install piyani
Collecting piyani
  Could not find a version that satisfies the requirement piyani (from versions: )
No matching distribution found for piyani
You are using pip version 8.1.1, however version 19.2.3 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
$ sudo pip3 install --upgrade pip
[sudo] password for abcd: 
The directory '/home/abcd/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/abcd/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting pip
  Downloading https://files.pythonhosted.org/packages/30/db/9e38760b32e3e7f40cce46dd5fb107b8c73840df38f0046d8e6514e675a1/pip-19.2.3-py2.py3-none-any.whl (1.4MB)
    100% |████████████████████████████████| 1.4MB 1.0MB/s 
Installing collected packages: pip
  Found existing installation: pip 8.1.1
    Not uninstalling pip at /usr/lib/python3/dist-packages, outside environment /usr
Successfully installed pip-19.2.3
$ pip3 --version
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'
$ pip3 install piyani
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'
$ sudo -H pip3 install -upgrade pip

Usage:   
  pip3 install [options] <requirement specifier> [package-index-options] ...
  pip3 install [options] -r <requirements file> [package-index-options] ...
  pip3 install [options] [-e] <vcs project url> ...
  pip3 install [options] [-e] <local project path> ...
  pip3 install [options] <archive url/path> ...

no such option: -u
$ pip3 --version
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'
$ sudo apt uninstall python2
E: Invalid operation uninstall
$ pip3 install piyani
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'
$ pip3 -version
Traceback (most recent call last):
  File "/usr/bin/pip3", line 9, in <module>
    from pip import main
ImportError: cannot import name 'main'
$ pip2 --version
pip 19.2.3 from /usr/local/lib/python2.7/dist-packages/pip-19.2.3-py2.7.egg/pip (python 2.7)
$ python3 --version
Python 3.5.2

相关内容