ubuntu安装python idle_在Ubuntu 14.06上正确安装Python 3.6以包含IDLE

在Ubuntu 14.06上尝试安装Python 3.6及IDLE时遇到错误。通过pip安装Python-43.4.6.tar.gz失败,提示文件不存在。错误可能源于使用了不适用于Python 2.7的pip版本,或下载的tarball不正确。同时,系统中存在Python 2.7和3.5.2,需确保安装过程针对Python 3.6。升级pip至9.0.1后问题依然存在,需要进一步排查。
摘要由CSDN通过智能技术生成

我正试图在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版本错误是否与此相关?

短暂性脑缺血发作

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值