Miniconda环境搭建

编程探索课程 2024-03-01 13:03:20

开场小菜

安装MinicondaMiniconda安装yum install wgetwget https://mirrors.ustc.edu.cn/anaconda/miniconda/Miniconda3-latest-Linux-x86_64.sh --no-check-certificate授予权限并且运行chmod 777 Miniconda3-latest-Linux-x86_64.shsh Miniconda3-latest-Linux-x86_64.sh

一路点击确定yes,并且需要记录conda的安装路径

最后询问是不是要初始化miniconda的时候,选择yes

修改环境变量vim ~/.bashrc

加入安装路径/bin

export PATH=/usr/local/miniconda3/bin:$PATH或者export PATH=/root/miniconda3/bin:$PATH

刷新环境变量

source ~/.bashrc

验证安装

conda -V添加下载频道conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/bioconda/配置Miniconda环境创建conda环境conda create -n python3.9 python=3.9.16默认不启动condaconda config --set auto_activate_base false激活conda环境conda activate python3.9

把requirements.txt放入某个目录下,同时在此目录下运行,内容如下:absl-py==1.4.0aenum==3.1.11alabaster==0.7.13anyio==3.6.2arrow==1.2.3astroid==2.15.1asttokens==2.2.1astunparse==1.6.3asyncio==3.4.3atomicwrites==1.4.1attrs==22.2.0autopep8==1.6.0Babel==2.12.1backcall==0.2.0bcrypt==3.2.2beautifulsoup4==4.12.0binaryornot==0.4.4black==23.3.0bleach==6.0.0Bottleneck==1.3.5brotlipy==0.7.0cachetools==5.3.0certifi==2022.12.7cffi==1.15.1chardet==5.1.0charset-normalizer==3.1.0click==8.1.3cloudpickle==2.2.1colorama==0.4.6comm==0.1.3cookiecutter==2.1.1cryptography==40.0.1debugpy==1.5.1decorator==5.1.1defusedxml==0.7.1diff-match-patch==20200713dill==0.3.6docopt==0.6.2docstring-to-markdown==0.12docutils==0.19entrypoints==0.4et-xmlfile==1.1.0executing==1.2.0fastapi==0.95.1fastjsonschema==2.16.3flake8==4.0.1flatbuffers==23.3.3gast==0.4.0google-auth==2.17.3google-auth-oauthlib==1.0.0google-pasta==0.2.0grpcio==1.53.0h11==0.14.0h5py==3.8.0idna==3.4imagesize==1.4.1importlib-metadata==6.1.0importlib-resources==5.12.0inflection==0.5.1intervaltree==3.0.2ipykernel==6.19.2ipython==7.33.0ipython-genutils==0.2.0isort==5.12.0jaraco.classes==3.2.3jax==0.4.8jedi==0.18.2jellyfish==0.9.0Jinja2==3.1.2jinja2-time==0.2.0jsonschema==4.17.3julian==0.14jupyter_client==8.1.0jupyter_core==5.3.0jupyterlab-pygments==0.2.2keras==2.12.0keyring==23.13.1lazy-object-proxy==1.6.0libclang==16.0.0Markdown==3.4.3MarkupSafe==2.1.1matplotlib-inline==0.1.6mccabe==0.6.1mistune==2.0.5mkl-fft==1.3.1mkl-random==1.2.2mkl-service==2.4.0ml-dtypes==0.0.4more-itertools==9.1.0mypy-extensions==1.0.0nbclient==0.7.2nbconvert==7.2.10nbformat==5.8.0nest-asyncio==1.5.6numexpr==2.8.4numpy==1.24.3numpydoc==1.5.0oauthlib==3.2.2openpyxl==3.1.2opt-einsum==3.3.0packaging==23.0pandas==1.5.3pandocfilters==1.5.0paramiko==3.1.0parso==0.8.3pathspec==0.11.1pexpect==4.8.0pickleshare==0.7.5pip==23.0.1pkgutil_resolve_name==1.3.10platformdirs==3.2.0pluggy==1.0.0ply==3.11prompt-toolkit==3.0.38protobuf==4.22.4psutil==5.9.0ptyprocess==0.7.0pure-eval==0.2.2pyasn1==0.5.0pyasn1-modules==0.3.0pycodestyle==2.8.0pycparser==2.21pydantic==1.10.7pydocstyle==6.3.0pyflakes==2.4.0Pygments==2.14.0pylint==2.17.1pylint-venv==3.0.1pyls-spyder==0.4.0PyNaCl==1.5.0pyOpenSSL==20.0.1PyQt5==5.15.7PyQt5-sip==12.11.0PyQtWebEngine==5.15.4pyrsistent==0.18.0PySocks==1.7.1pyswmm==1.4.0python-dateutil==2.8.2python-lsp-black==1.1.0python-lsp-jsonrpc==1.0.0python-lsp-server==1.7.2python-slugify==8.0.1pytoolconfig==1.2.5pytz==2022.7PyYAML==6.0pyzmq==23.2.0QDarkStyle==3.0.2qstylizer==0.2.2QtAwesome==1.2.3qtconsole==5.4.2QtPy==2.3.1requests==2.28.2requests-oauthlib==1.3.1rope==1.7.0rsa==4.9Rtree==1.0.1scipy==1.10.1setuptools==65.6.3sip==6.6.2six==1.16.0sniffio==1.3.0snowballstemmer==2.2.0sortedcontainers==2.4.0soupsieve==2.3.2.post1Sphinx==6.1.3sphinxcontrib-applehelp==1.0.4sphinxcontrib-devhelp==1.0.2sphinxcontrib-htmlhelp==2.0.1sphinxcontrib-jsmath==1.0.1sphinxcontrib-qthelp==1.0.3sphinxcontrib-serializinghtml==1.1.5spyder==5.2.2spyder-kernels==2.2.1stack-data==0.6.2starlette==0.26.1swmm-toolkit==0.12.0tensorboard==2.12.1tensorboard-data-server==0.7.0tensorboard-plugin-wit==1.8.1termcolor==2.3.0text-unidecode==1.3textdistance==4.5.0three-merge==0.1.1tinycss2==1.2.1toml==0.10.2tomli==2.0.1tomlkit==0.11.1tornado==6.2traitlets==5.9.0typing_extensions==4.5.0ujson==5.4.0Unidecode==1.3.6urllib3==1.26.15uvicorn==0.21.1watchdog==3.0.0wcwidth==0.1.9webencodings==0.5.1Werkzeug==2.3.3whatthepatch==1.0.4wheel==0.38.4win-inet-pton==1.1.0wincertstore==0.2wrapt==1.11.2yapf==0.32.0yarg==0.1.9zipp==3.15.0pip install -i https://pypi.douban.com/simple -r requirements.txt启动nohup uvicorn main:app --host '0.0.0.0' --port 8021 --reload > swmm.log 2>&1 &退出conda deactivate
0 阅读:8

编程探索课程

简介:感谢大家的关注