pbootcms网站模板|日韩1区2区|织梦模板||网站源码|日韩1区2区|jquery建站特效-html5模板网

如何將 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 路徑)
主站蜘蛛池模板: 阿里巴巴诚信通温州、台州、宁波、嘉兴授权渠道商-浙江联欣科技提供阿里会员办理 | 防腐木批发价格_深圳_惠州_东莞防腐木厂家_森源(深圳)防腐木有限公司 | China plate rolling machine manufacturer,cone rolling machine-Saint Fighter | 京马网,京马建站,网站定制,营销型网站建设,东莞建站,东莞网站建设-首页-京马网 | 烟台条码打印机_烟台条码扫描器_烟台碳带_烟台数据采集终端_烟台斑马打印机-金鹏电子-金鹏电子 | 三轴曲线机-端子插拔力试验机|华杰仪器 | 电销卡_北京电销卡_包月电话卡-豪付网络 | 二手电脑回收_二手打印机回收_二手复印机回_硒鼓墨盒回收-广州益美二手电脑回收公司 | 高考志愿规划师_高考规划师_高考培训师_高报师_升学规划师_高考志愿规划师培训认证机构「向阳生涯」 | 福建自考_福建自学考试网| 百度爱采购运营研究社社群-店铺托管-爱采购代运营-良言多米网络公司 | 压滤机-洗沙泥浆处理-压泥机-山东创新华一环境工程有限公司 | 祝融环境-地源热泵多恒系统高新技术企业,舒适生活环境缔造者! | 挨踢网-大家的导航! | led太阳能路灯厂家价格_风光互补庭院灯_农村市政工程路灯-中山华可路灯品牌 | lcd条形屏-液晶长条屏-户外广告屏-条形智能显示屏-深圳市条形智能电子有限公司 | 真空泵厂家_真空泵机组_水环泵_旋片泵_罗茨泵_耐腐蚀防爆_中德制泵 | 成人纸尿裤,成人尿不湿,成人护理垫-山东康舜日用品有限公司 | uv固化机-丝印uv机-工业烤箱-五金蚀刻机-分拣输送机 - 保定市丰辉机械设备制造有限公司 | 今日娱乐圈——影视剧集_八卦娱乐_明星八卦_最新娱乐八卦新闻 | 多功能干燥机,过滤洗涤干燥三合一设备-无锡市张华医药设备有限公司 | 巨野月嫂-家政公司-巨野县红墙安康母婴护理中心 | 交联度测试仪-湿漏电流测试仪-双85恒温恒湿试验箱-常州市科迈实验仪器有限公司 | 合景一建-无尘车间设计施工_食品医药洁净车间工程装修总承包公司 | 铝单板_铝窗花_铝单板厂家_氟碳包柱铝单板批发价格-佛山科阳金属 | 锯边机,自动锯边机,双面涂胶机-建业顺达机械有限公司 | 游戏版号转让_游戏资质出售_游戏公司转让-【八九买卖网】 | 南溪在线-南溪招聘找工作、找房子、找对象,南溪综合生活信息门户! | 锂电池砂磨机|石墨烯砂磨机|碳纳米管砂磨机-常州市奥能达机械设备有限公司 | 钢骨架轻型板_膨石轻型板_钢骨架轻型板价格_恒道新材料 | 办公室家具_板式办公家具定制厂家-FMARTS福玛仕办公家具 | 低压载波电能表-单相导轨式电能表-华邦电力科技股份有限公司-智能物联网综合管理平台 | 绿萝净除甲醛|深圳除甲醛公司|测甲醛怎么收费|培训机构|电影院|办公室|车内|室内除甲醛案例|原理|方法|价格立马咨询 | 整合营销推广|营销网络推广公司|石家庄网站优化推广公司|智营销 好物生环保网、环保论坛 - 环保人的学习交流平台 | 无锡门窗-系统门窗-阳光房-封阳台-断桥铝门窗厂[窗致美] | 变色龙云 - 打包app_原生app_在线制作平台_短链接_ip查询 | 生态板-实木生态板-生态板厂家-源木原作生态板品牌-深圳市方舟木业有限公司 | 电气控制系统集成商-PLC控制柜变频控制柜-非标自动化定制-电气控制柜成套-NIDEC CT变频器-威肯自动化控制 | 物联网卡_物联网卡购买平台_移动物联网卡办理_移动联通电信流量卡通信模组采购平台? | 杭州网络公司_百度SEO优化-外贸网络推广_抖音小程序开发-杭州乐软科技有限公司 | 武汉宣传片制作-视频拍摄-企业宣传片公司-武汉红年影视 |