我正试图在Ubuntu 14.06上安装Python 3.6。我试过使用get apt命令,也试过用tarball安装。不管怎样,这都是我收到的错误。:~/Downloads$ pip install Python-43.4.6.tar.gz
Requirement 'Python-43.4.6.tar.gz' looks like a filename, but the file does not exist
Processing ./Python-43.4.6.tar.gz
Exception: Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 209, in main status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 328, in run wb.build(autobuilding=True)
File "/usr/lib/python2.7/dist-packages/pip/wheel.py", line 748, in build self.requirement_set.prepare_files(self.finder)
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 360, in prepare_files ignore_dependencies=self.ignore_dependencies))
File "/usr/lib/python2.7/dist-packages/pip/req/req_set.py", line 577, in _prepare_file session=self.session, hashes=hashes)
File "/usr/lib/python2.7/dist-packages/pip/download.py", line 798, in unpack_url unpack_file_url(link, location, download_dir, hashes=hashes) File "/usr/lib/python2.7/dist-packages/pip/download.py", line 705, in unpack_file_url unpack_file(from_path, location, content_type, link) File "/usr/lib/python2.7/dist-packages/pip/utils/__init__.py", line 620, in unpack_file tarfile.is_tarfile(filename) or
File "/usr/lib/python2.7/tarfile.py", line 2622, in is_tarfile t = open(name)
File "/usr/lib/python2.7/tarfile.py", line 1673, in open return func(name, "r", fileobj, **kwargs)
File "/usr/lib/python2.7/tarfile.py", line 1738, in gzopen fileobj = gzip.GzipFile(name, mode, compresslevel, fileobj)
File "/usr/lib/python2.7/gzip.py", line 94, in __init__ fileobj = self.myfileobj = __builtin__.open(filename, mode or 'rb')
IOError: [Errno 2] No such file or directory: '/home/michael/Downloads/Python-43.4.6.tar.gz'
You are using pip version 8.1.1, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
:~/Downloads$ pip install --upgrade pip
Collecting pip
Downloading pip-9.0.1-py2.py3-none-any.whl (1.3MB) 100% |████████████████████████████████| 1.3MB 662kB/s Installing collected packages: pip
Successfully installed pip-8.1.1
You are using pip version 8.1.1, however version 9.0.1 is available. You should consider upgrading via the 'pip install --upgrade pip' command.
~/Downloads$ pip -V
pip 9.0.1 from /home/michael/.local/lib/python2.7/site-packages (python 2.7)
~/Downloads$ python -V
Python 2.7.12
~/Downloads$ python3 -V
Python 3.5.2
我是否下载了错误的tarball,或者是否有方法确保我没有使用for Python 2.7安装?另外,pip版本错误是否与此相关?
短暂性脑缺血发作