久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

使用兩個不同的 Python 發行版

Using two different Python Distributions(使用兩個不同的 Python 發行版)
本文介紹了使用兩個不同的 Python 發行版的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我目前已在我的計算機上下載并使用了 continuum analytics 的 Python 發行版(稱為 anaconda).我的問題是我想將 virtualenv 用于燒瓶項目,而 anaconda 會閃爍警告說不支持虛擬環境".有什么辦法可以在同一臺計算機上運行兩個發行版,股票 python 和 anaconda?

I currently have continuum analytics' python distribution (called anaconda) downloaded and in use on my computer. My problem is that I want to use virtualenv for a flask project and anaconda flashes a warning that says "virtual env is not supported". Is there any way i can run two distributions, stock python and anaconda on the same computer?

推薦答案

當然,如果你想單獨使用 Anaconda 發行版,你可以設置一個別名來運行那個版本,并且將 stock python 保留為默認值.

Sure, if you want to use the Anaconda distribution separately, you can set up an alias to run that version and leave the stock python as the default.

p>

在您的 .bash_profile 文件中,Anaconda 安裝程序可能會放入以下行:

In your .bash_profile file, the Anaconda installer probably put the following line:

export PATH="/path/to/your/anaconda/bin:$PATH"

注釋掉這個,并添加一個別名;例如

Comment this out, and add an alias; e.g.

alias pyconda='/path/to/your/anaconda/bin/python'

然后您可以通過在新終端中運行 pyconda 來運行您的 Anaconda python 發行版.

You can then run your Anaconda python distribution by running pyconda in a new terminal.

更新

實際上,當您想使用 anaconda 安裝中的所有內容而不是僅使用 python 時,將它放在您的路徑中可能會更好(這就是您的 ipython 最初損壞的原因).

It'd actually probably be better to put everything in the anaconda install into your path when you'd like to use it instead of just python (this is why your ipython broke initially).

為此,請設置一個別名,如下所示:

To do this, set up an alias such as the following:

alias anacondainit='export PATH="/path/to/your/anaconda/bin:$PATH"'

然后,您的 anaconda 安裝將成為該終端會話中所有內容的默認設置.

Then your anaconda install will be the default for everything in that terminal session.

例如,打開一個新終端后,嘗試以下操作:

For instance, after opening up a new terminal, try the following:

amorgan$ python # on a freshly opened terminal, this will load your default distro
Python 2.7.2 |EPD 7.2-1 (32-bit)| (default, Sep  7 2011, 09:16:50)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "packages", "demo" or "enthought" for more information.
>>> exit()

amorgan$ anacondainit #initialize anaconda
amorgan$ python #now when we run python, it will load the anaconda distro
Python 2.7.6 |Anaconda 1.8.0 (x86_64)| (default, Nov 11 2013, 10:49:09)
[GCC 4.0.1 (Apple Inc. build 5493)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

要再次使用您的其他發行版,只需加載一個新終端,從而將 anaconda 排除在您的路徑之外.

To use your other distribution again, just load up a new terminal, thus getting anaconda out of your path.

這篇關于使用兩個不同的 Python 發行版的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

How to install Selenium in a conda environment?(如何在 conda 環境中安裝 Selenium?)
get the CUDA and CUDNN version on windows with Anaconda installe(使用 Anaconda installe 在 Windows 上獲取 CUDA 和 CUDNN 版本)
How can I download Anaconda for python 3.6(如何下載適用于 python 3.6 的 Anaconda)
How can I install Anaconda aside an existing pyenv installation on OSX?(除了 OSX 上現有的 pyenv 安裝之外,如何安裝 Anaconda?)
Permanently set Python path for Anaconda within Cygwin(在 Cygwin 中為 Anaconda 永久設置 Python 路徑)
Pipenv with Conda?(Pipenv 與 Conda?)
主站蜘蛛池模板: 成人三级在线观看 | 999久久久久久久久 国产欧美在线观看 | 青青久久久 | 成人国产精品色哟哟 | 一区二区福利视频 | 黄色一级大片在线观看 | 国产九一精品 | 欧美精品在线播放 | 国产精品日韩一区二区 | 免费欧美 | 91国内产香蕉 | 欧美乱大交xxxxx另类电影 | 日韩在线电影 | 日日夜夜草 | 国产欧美精品一区二区 | 日本精品一区 | 国产精品福利视频 | 欧美性大战久久久久久久蜜臀 | 精品欧美一区二区三区久久久小说 | 久久中文字幕视频 | 在线观看av不卡 | 国产99久久精品一区二区300 | 国产精品久久久久久婷婷天堂 | 亚洲精品国产第一综合99久久 | 国产电影一区二区三区爱妃记 | 国产精品久久久久久久久久久新郎 | 日韩成人专区 | 久久专区 | 香蕉久久av | 欧美精品一区二区三区在线 | 国产精品不卡 | 久久高清 | 久久久www | 91资源在线 | 日韩一区二区三区在线看 | 中国美女撒尿txxxxx视频 | 日韩免费av | 一区二区三区中文字幕 | 久久久久久国产精品免费免费狐狸 | 羞羞的视频免费在线观看 | 亚洲一区二区免费 |