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

如何將 anaconda 添加到 PATH?

How to add anaconda to PATH?(如何將 anaconda 添加到 PATH?)
本文介紹了如何將 anaconda 添加到 PATH?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

我在我的系統 (Mac OS) 上下載了 Anaconda,目前只是為了使用 Spyder 在 Python 中編寫代碼.我有兩個問題,對于比我更適合計算機的人來說,這可能很容易解決.我很樂意提供幫助!

I downloaded Anaconda on my system (Mac OS), for now solely for the purpose of using Spyder to code in Python. I am having two issues, which are probably easy to solve for someone who is more fit with computers than me. I would be glad for help!

  1. 是否將 anaconda 添加到 PATH,如果是,如何添加?

在 此線程中,我得到了更新方面的幫助Anaconda 和 Spyder,因為執行 conda update anacondaconda update spyder 行會導致 zsh: command not found.顯然,這與 anaconda 未添加到我的路徑有關.在那個線程中,我得到了一種解決方法,而無需將 anaconda 添加到我的路徑中.但是,每次更新之前我都必須運行命令行.

In this thread here I got help with updating Anaconda and Spyder, since executing the lines conda update anaconda and conda update spyder would result in zsh: command not found. Apparently this has to do with anaconda not being added to my PATH. In that thread I was offered a workaround without adding anaconda to my path. However I would have to run a commandline everytime before I update it.

現在,我完全承認,我什至不知道將 anaconda 添加到我的路徑中意味著什么.而且我不知道添加它有什么利弊.但是我有點想添加它,這樣我每次更新時都不必查找和運行這個命令行.有人可以解釋一下我是否應該將 anaconda 添加到 PATH 中,如果是的話,如何?

Now, I fully admit, that I don't even know what it means to add anaconda to my path. And I don't know what are the pros and cons of adding it, or not. But I kind of would like to add it, such that I don't have to look up and run this command line every time when I update. Could someone please explain if I should add anaconda to PATH, and if so, how?

  1. 哪個 Python 發行版被什么人使用?

我對系統上的 python 發行版感到非常困惑.

I am getting very confused with python distributions on my system.

  • 在我看到的 Spyder 底部的面板中,它使用 Python 3.7.4..
  • 在 Spyder 的 IPython 控制臺中,我看到它使用 Python 3.7.0.
  • 如果我在終端中運行 python --version 我會得到 Python 2.7.16
  • 如果我在終端中運行 python3 --version 我會得到 Python 3.7.3
  • In the panel at the bottom of Spyder I see, that it uses Python 3.7.4..
  • In the IPython console of Spyder I see that it uses Python 3.7.0.
  • If I run python --version in a terminal I get Python 2.7.16
  • If I run python3 --version in a terminal I get Python 3.7.3

為什么我的系統上有所有這些不同的版本?如果我在 Spyder 中開發了一個腳本,然后想從終端運行它,那么我當然想使用與 Spyder 使用的相同的 python 解釋器來運行它.我怎樣才能確保是這種情況?例如,我是通過 python script.py、`python3 script.py′ 還是通過另一個命令行運行名為 script.py 的腳本?

Why are all these different versions on my system? If I develop a script in Spyder, and then want to run it from the terminal, then I of course would like to run it with the same python interpreter as the one Spyder uses. How can I make sure this is the case? Do I for example run a script named script.py by python script.py, by `python3 script.py′, or by yet another command line?

我什至不確定 pythonpython3 是否調用 anaconda 附帶的發行版,因為當我運行 which pythonwhich python3 我得到 /usr/bin/python 或用戶 /usr/bin/python3,而 anaconda 安裝在 Users/opt/<my_username>/anaconda3/bin.

I am not even sure if python or python3 calls the distributions which came with anaconda, since when I run which python or which python3 I get /usr/bin/python or user /usr/bin/python3, while anaconda is installed in Users/opt/<my_username>/anaconda3/bin.

所以,如果有人也可以為我清除這里的迷霧,那就太好了!:)

So if someone could clear the fog here for me please as well, that would be great! : )

感謝您的幫助!

推薦答案

macOS 自帶一個 Python v(大多數時候是 2.x),你已經為另一個版本安裝了 anaconda.要檢查這一點,您可以先運行以下命令:

A Python v (most of the time 2.x) comes with macOS and you have installed anaconda for the other one version. to check this you can first run this command:

conda env list

如果您已將 python2x 作為新環境安裝,它將顯示為:

if you have installed python2x as a new env it will show up as:

# conda environments:
#
base                  *  /Users/your_user/Applications/anaconda3
py2                      /Users/your_user/Applications/anaconda3/envs/py2

如果你只看到'base'(對我來說是 anaconda3 所以 python 3.x),那么它說你的 macOS 有 python2.x(或相反).通常以下命令會顯示您的默認 python 版本:

if you only see 'base' (which is for me is anaconda3 so python 3.x) then it says that you had python2.x with your macOS ( or the reverse). Normally the below command shows your default python version:

    python --version
output (for me): Python 3.7.6

其中顯示了您的 Anaconda 版本.如果你想使用另一個,你可以1)在這里使用我的答案來改變它:如何將默認的python3設置為python3.7?

Which shows the version you have with your Anaconda. If you want to use the other one, you can either 1) change this by using my answer here: How to set the default python3 to python3.7?

2) 或者您可以在您的 anaconda 環境中添加一個新的env"(如果在上面您只看到base").此處提到了說明:https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

2) or you can add a new "env" to your anaconda environments (if in the above you see only 'base'). The instructions are mentioned here: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html

這篇關于如何將 anaconda 添加到 PATH?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持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 路徑)
主站蜘蛛池模板: av网站免费| 亚洲成色777777在线观看影院 | av中文字幕在线 | 热久久999| 亚洲国产成人精品久久久国产成人一区 | 久久高清 | 91久久伊人 | 国产精品日产欧美久久久久 | 黄色一级片在线播放 | 亚洲国产精品一区二区三区 | av手机免费在线观看 | 中文字幕亚洲精品 | 影音先锋中文字幕在线观看 | 亚洲精品电影网在线观看 | 亚洲精品国产电影 | 超碰成人在线观看 | 91视频网| 男人av网| 亚洲精品九九 | 国产福利二区 | 日韩在线免费看 | 91精品国产91久久久久久最新 | 精品久久久久久久久久 | 日韩中文字幕视频 | 在线免费黄色小视频 | 黄色av免费 | 天堂成人国产精品一区 | 成人精品鲁一区一区二区 | 午夜二区 | 国产精品高清在线 | 免费成人在线网站 | 日韩精品一区二区三区第95 | 81精品国产乱码久久久久久 | 一区二区三区国产 | 国产成人免费在线 | 欧洲国产精品视频 | 一级黄片一级毛片 | 一级特黄a大片 | 亚洲免费一区二区 | 米奇狠狠鲁 | 天天搞天天操 |