{"id":1588,"date":"2023-12-02T15:03:52","date_gmt":"2023-12-02T07:03:52","guid":{"rendered":"https:\/\/peloo.net\/?p=1588"},"modified":"2024-12-12T21:29:24","modified_gmt":"2024-12-12T13:29:24","slug":"ubuntu%e5%ae%89%e8%a3%85miniconda3","status":"publish","type":"post","link":"https:\/\/peloo.net\/?p=1588","title":{"rendered":"Ubuntu\u5b89\u88c5miniconda\u5e76\u7ba1\u7406\u865a\u62df\u73af\u5883"},"content":{"rendered":"<h1>\u5b89\u88c5miniconda<\/h1>\n<pre><code class=\"language-bash\"># \u5728\u666e\u901a\u7528\u6237\u4e0b\u64cd\u4f5c\u5373\u53ef\uff0c\u4e0d\u63a8\u8350root\u7528\u6237\u64cd\u4f5c\uff0c\ncd\nmkdir -p ~\/miniconda3\nwget -c https:\/\/repo.anaconda.com\/miniconda\/Miniconda3-latest-Linux-x86_64.sh -O ~\/miniconda3\/miniconda.sh\nbash ~\/miniconda3\/miniconda.sh -b -u -p ~\/miniconda3\nrm -rf ~\/miniconda3\/miniconda.sh\n~\/miniconda3\/bin\/conda init bash\nexec bash\n# \u66f4\u65b0miniconda\nconda update -y --all\n# \u67e5\u770b\u5f53\u524d\u7684\u865a\u62df\u73af\u5883\uff0c\u9ed8\u8ba4\u4f1a\u5b89\u88c5\u4e00\u4e2a\u540d\u4e3abase\u7684\u865a\u62df\u73af\u5883\nconda env list\n<\/code><\/pre>\n<h1>\u65b0\u5efa\u5f53\u524d\u9879\u76ee\u7684\u865a\u62df\u73af\u5883<\/h1>\n<pre><code class=\"language-bash\"># \u521b\u5efa\u540d\u4e3a\u201cpy38\u201d\u7684\u865a\u62df\u73af\u5883\nconda create -n py38 python==3.8.0 -y\n# \u6fc0\u6d3b\u865a\u62df\u73af\u5883\nconda activate py38\n# \u66f4\u6362\u56fd\u5185pip\u6e90\npip config set global.index-url https:\/\/pypi.tuna.tsinghua.edu.cn\/simple\npip config set global.index-url https:\/\/mirrors.aliyun.com\/pypi\/simple\npip install -U pip\n# \u767b\u5f55\u9ed8\u8ba4\u52a0\u8f7d\u65b0\u5efa\u7684py38\u865a\u62df\u73af\u5883\uff0c\u53ea\u9700\u8981\u5728\u5f53\u524d\u7528\u6237.bashrc\u6587\u4ef6\u672b\u5c3e\u6dfb\u52a0\u5982\u4e0b\u884c\u5373\u53ef\uff0c\nconda activate py38\nexec bash\npip install pipenv\n# \u8fdb\u5165\u5230\u9879\u76ee\u7684\u6839\u76ee\u5f55\u4e0b\ncd \/proj\/file\/dir\n# \u5982\u679c\u6839\u76ee\u5f55\u6709Pipfile\u548cPipfile.lock\u4e24\u4e2a\u6587\u4ef6\uff0c\u5219\u53ef\u4ee5\u76f4\u63a5\u8fd0\u884c\u4ee5\u4e0b\u547d\u4ee4\u521b\u5efa\u5f53\u524d\u9879\u76ee\u7684\u865a\u62df\u73af\u5883\npipenv install\npipenv --venv\n# \u6ce8\u610f\u53ea\u6709\u5728\u5f53\u524d\u9879\u76ee\u76ee\u5f55\u624d\u80fd\u770b\u5230\u662f\u5426\u6709\u5f53\u524d\u9879\u76ee\u5bf9\u5e94\u7684\u865a\u62df\u73af\u5883\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u5b89\u88c5miniconda # \u5728\u666e\u901a\u7528\u6237\u4e0b\u64cd\u4f5c\u5373\u53ef\uff0c\u4e0d\u63a8\u8350root\u7528\u6237\u64cd\u4f5c\uff0c cd mkdir -p ~\/miniconda3 wget -c https:\/\/repo.anaconda.com\/miniconda\/Miniconda3-latest-Linux-x86_64.sh -O ~\/miniconda3\/miniconda.sh bash ~\/miniconda3\/miniconda.sh -b -u -p ~\/miniconda3 rm -rf ~\/miniconda3\/miniconda.sh ~\/miniconda3\/bin\/conda init bash exec bash # \u66f4\u65b0miniconda conda update -y &#8211;all # \u67e5\u770b\u5f53\u524d\u7684\u865a\u62df\u73af\u5883\uff0c\u9ed8\u8ba4\u4f1a\u5b89\u88c5\u4e00\u4e2a\u540d\u4e3abase\u7684\u865a\u62df\u73af\u5883 conda env list \u65b0\u5efa\u5f53\u524d\u9879\u76ee\u7684\u865a\u62df\u73af\u5883 # \u521b\u5efa\u540d\u4e3a\u201cpy38\u201d\u7684\u865a\u62df\u73af\u5883 conda create -n py38 python==3.8.0 -y # \u6fc0\u6d3b\u865a\u62df\u73af\u5883 conda activate py38 # \u66f4\u6362\u56fd\u5185pip\u6e90 pip config&#8230;<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"brizy-blank-template.php","format":"standard","meta":{"footnotes":""},"categories":[44],"tags":[],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/1588"}],"collection":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1588"}],"version-history":[{"count":8,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/1588\/revisions"}],"predecessor-version":[{"id":1662,"href":"https:\/\/peloo.net\/index.php?rest_route=\/wp\/v2\/posts\/1588\/revisions\/1662"}],"wp:attachment":[{"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1588"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1588"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/peloo.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1588"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}