为什么我不能在 Ubuntu16.04 上安装 python3.6-dev
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/43621584/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Why can't I install python3.6-dev on Ubuntu16.04
提问by Sanjit kumar
I am trying to install Python 3.6-dev
with this command:
我正在尝试Python 3.6-dev
使用以下命令进行安装:
sudo apt-get install python3.6-dev
but I'm getting this error:
但我收到此错误:
E: Unable to locate package python3.6-dev
E: Couldn't find any package by glob 'python3.6-dev'
E: Couldn't find any package by regex 'python3.6-dev'
Can anyone help? Why am I getting this error and what is the correct way to install the package?
任何人都可以帮忙吗?为什么我会收到此错误以及安装软件包的正确方法是什么?
回答by Jobomat
As mentioned by omajid the package is not availible in 16.04. But if you need it in 16.04 you can get it by adding for example the personal package repository of Felix Krull:
正如 omajid 所提到的,该软件包在 16.04 中不可用。但是如果你在 16.04 需要它,你可以通过添加例如 Felix Krull 的个人包存储库来获取它:
sudo add-apt-repository ppa:fkrull/deadsnakes
Edit: The above PPA has been disabled, see discussion hereand the new PPA here. So use the PPA mentioned below to use it:
编辑:以上PPA已被禁用,见讨论这里和新的PPA这里。所以使用下面提到的PPA来使用它:
sudo add-apt-repository ppa:deadsnakes/ppa
sudo add-apt-repository ppa:deadsnakes/ppa
回答by Aquarius
This ppa worked like a charm on ubuntu 16.04. Posting here for others.
这个 ppa 在 ubuntu 16.04 上就像一个魅力。在这里发布给其他人。
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt-get update
sudo apt-get install python3.6
回答by DINA TAKLIT
For those who tried to install python-3.6 and got same error as that one above. This can help you as well us it helped me fix out the pb.
对于那些尝试安装 python-3.6 并遇到与上面相同的错误的人。这对我们也有帮助,它帮助我解决了 pb。
Open terminal then run command to add the PPA:
sudo add-apt-repository ppa:jonathonf/python-3.6
Then check updates and install Python 3.6 via commands:
sudo apt-get update
sudo apt-get install python3.6
打开终端,然后运行命令添加 PPA:
sudo add-apt-repository ppa:jonathonf/python-3.6
然后通过命令检查更新并安装 Python 3.6:
sudo apt-get update
sudo apt-get install python3.6
Now to make sure you had install successufly just run python3.6-v
or python3.6
现在要确保您安装成功,只需运行python3.6-v
或python3.6
For more details check here "How to Install Python 3.6.1 in Ubuntu 16.04 LTS"
有关更多详细信息,请查看此处“如何在 Ubuntu 16.04 LTS 中安装 Python 3.6.1”
Note: Linux 16.04 use python v 2.7 as default one if u needa use python 3.6 in your project just set python-3.6 as default version for this project. It's better then use
sudo update-alternatives ...
command then your terminal will vanish :(.
注意:Linux 16.04 使用 python v 2.7 作为默认版本,如果您需要在项目中使用 python 3.6,只需将 python-3.6 设置为此项目的默认版本。最好使用
sudo update-alternatives ...
命令然后您的终端将消失:(。
回答by omajid
The package is too new. It's not available in the older 16.04 release. It's available in the newerUbuntu 16.10.
包太新了。它在较旧的 16.04 版本中不可用。它在较新的Ubuntu 16.10 中可用。
回答by sushrut619
sudo add-apt-repository ppa:deadsnakes/ppa
Guess they changed the name of repo.
猜猜他们更改了 repo 的名称。