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

OS X - 在 anaconda 和自制 Python 環境之間做出決定

OS X - Deciding between anaconda and homebrew Python environments(OS X - 在 anaconda 和自制 Python 環境之間做出決定)
本文介紹了OS X - 在 anaconda 和自制 Python 環境之間做出決定的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我在我的 Mac OS X 上廣泛使用 Python,用于數字應用程序和 Web 開發(大致相同).我檢查了我最近在筆記本電腦上安裝的 Python 數量,震驚地發現 四個:

I use Python extensively on my Mac OS X, for both numerical applications and web development (roughly equally). I checked the number of Python installations I had on my laptop recently, and was shocked to find four:

Came with Mac OS X:
/usr/bin/python
Python 2.7.6 (default, Sep  9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin

Installed via Homebrew
/usr/local/bin/python
Python 2.7.10 (default, Jul 13 2015, 12:05:58)
[GCC 4.2.1 Compatible Apple LLVM 6.1.0 (clang-602.0.53)] on darwin

Installed via Anaconda/Miniconda
~/anaconda/bin/python
Python 2.7.10 |Anaconda 2.3.0 (x86_64)| (default, Oct 19 2015, 18:31:17)
[GCC 4.2.1 (Apple Inc. build 5577)] on darwin
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org

Came with the downloaded .pkg from python.org
/System/Library/Frameworks/Python.framework/Versions/Current/bin/python
Python 2.7.6 (default, Sep  9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin

我決定統一所有這些,并使用 conda.我刪除了 Homebrew 版本和 Python.org 下載(保留主系統).Conda 非常適合數值計算,因為我可以在根環境中安裝 Jupyter/Numpy/Pandas,而不必為每個項目都安裝 virtualenvs.

I decided to unify all of this, and use conda. I removed the Homebrew version and the Python.org download (kept the main system one). Conda is great for numerical computing, because I can install Jupyter/Numpy/Pandas in the root environment, and not have to bother install virtualenvs for every project.

但是現在我的整個 Web 開發工作流程都搞砸了.我的 virtualenvs 都不起作用,因為顯然不應該同時使用 conda 和 virtualenv.我嘗試從 requirements.txt 文件創建 conda 環境.我與 django 一起使用的一個包是markdown_deux",它在 Conda 存儲庫中不可用.我查看了構建它的方法,但創建一個配方需要付出很多努力(創建 YAML 文件等)

But now my entire web development workflow is messed up. None of my virtualenvs work, since apparently one's not supposed to use conda and virtualenv together. I tried to create conda environments from the requirements.txt file. One package I was using with django was "markdown_deux", which is not available in the Conda repo. I looked at ways of building it, but creating a recipe takes a lot of effort (create YAML file, etc..)

有沒有人為此找到一個好的折衷方案?我正在考慮回到自制版本以供一般使用,并編寫一個別名以根據需要將路徑更改回 conda 版本.雖然這也需要跟蹤我現在使用的是哪一個..

Has anyone found a good compromise for this? I'm thinking of going back to the homebrew version for general use, and writing an alias for changing the path back to the conda version as necessary. Though this will also require tracking which one I'm using now..

推薦答案

我的所有項目(數據科學、一些 Web 開發)都使用 Homebrew Python.

I use Homebrew Python for all my projects (data science, some web dev).

Conda 沒有什么花哨的,您可以通過組合 pip 和 自制科學.實際上,它甚至更好,因為您可以更好地控制您安裝的內容.

Conda is nothing fancy, you can have the same packages by hand with a combination of pip and Homebrew science. Actually, it is even better because you have more control on what you install.

您只能在進行 Web 開發時使用您的 virtualenvs.對于數字應用程序,您可能希望始終擁有最新版本的軟件包.

You can use your virtualenvs only when you do web development. For the numerical applications you will probably want to have the latest versions of your packages at all times.

如果你想用 pip 一次性更新你所有的包,你可以使用這個命令:

If you want to update all your packages at once with pip, you can use this command:

sudo -H pip freeze --local | grep -v '^-e' | cut -d = -f 1  | xargs -n1 sudo -H pip install -U

這個答案是舊的,如果你想要一個更最新的比較,我發現這篇不錯的博客文章比較了這兩種方法:

This answer is old, if you want a more up-to-date comparison, I found this nice blog article which compares the two approaches:

https://towardsdatascience.com/pipenv-vs-conda-for-data-scientists-b9a372faf9d9

我仍然使用 Homebrew Python,并在 conda 上使用 pip/pipenv.

I still use Homebrew Python, and pip / pipenv over conda.

這篇關于OS X - 在 anaconda 和自制 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)
Using two different Python Distributions(使用兩個不同的 Python 發行版)
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 路徑)
主站蜘蛛池模板: 麻豆久久久9性大片 | 91资源在线 | 狠狠草视频 | 日韩欧美精品一区 | 91综合网| 我爱操 | 久久精品色欧美aⅴ一区二区 | 日本一区二区三区四区 | 在线精品亚洲欧美日韩国产 | 中文字幕日韩欧美 | 天天射影院 | 国产精品国产精品国产专区不卡 | 亚洲精品一区二区冲田杏梨 | 欧美成人精品一区二区男人看 | 国产精品视频久久 | 国产日韩欧美一区二区在线播放 | 日本福利一区 | 不卡在线视频 | 国产成人精品一区二区三区四区 | 日日爱视频 | 精品国产乱码久久久久久1区2区 | 在线观看免费av网 | 成人a视频 | 一级毛片色一级 | 成人依人| 国产区高清 | 久久国产激情视频 | 日本欧美视频 | 精品久久免费 | 嫩草一区二区三区 | 成人久久 | 午夜影院中文字幕 | 91欧美激情一区二区三区成人 | 国产精品一区二 | 伊人久久综合 | aaa大片免费观看 | 免费av播放 | 国产电影一区二区在线观看 | 精品国产精品一区二区夜夜嗨 | 欧美a区| 欧亚av在线 |