简体   繁体   English

如何使用pip在Ubuntu终端中pip安装Python 3?

[英]How can I use pip to pip install Python 3 in Ubuntu terminal?

Currently using Cloud9 's ACE IDE dev environment for some learning opportunities, however, I ran into an API that is exclusively made for Python 3 . 目前,我正在使用Cloud9的ACE IDE开发环境来获得一些学习机会,但是,我遇到了专门为Python 3的API。

How can I pip install Python 3 while keeping python 2.7.6 (the current version) intact? 如何在保持python 2.7.6 (当前版本)完整的同时pip安装Python 3?

pip cannot be used to install Python , pip is used to install python packages, it's a package manager . pip不能用于安装Pythonpip用于安装python软件包,它是软件包管理器

If you are looking for a command line utility that handles installing different version of CPython , (among other things) you can look at conda , conda is an environment manager . 如果您正在寻找一个命令行实用程序来处理不同版本的CPython安装(除其他事项外),您可以看看conda ,conda是一个环境管理器

conda is usually packaged with anaconda and works by managing environments in which you can specify different versions of Python. conda通常与anaconda打包在一起,并通过管理可以在其中指定不同版本的Python的环境来工作。 It helps you easily install different (with conda env create versions of python and switch between them via different environments (with source activate ). 它可以帮助您轻松安装其他版本(使用conda env create python版本,并通过不同的环境在它们之间进行切换(使用source activate )。

From the question it seems like you want to use apt-get instead of pip. 从这个问题看来,您似乎想使用apt-get而不是pip。

Try this: 尝试这个:

sudo apt-get install python3

您不能使用pip来安装Python3。在任何情况下,由于您特别提到了Cloud9 IDE,它已经随Python 2和3一起提供了。尽管pythonpython2是符号链接的,所以如果要调用Python 3,则可以必须在终端中键入python3 (而不是python )。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM