conda 导出环境文件的方法(文件方法)
1、导出环境
conda env export > environment.yml
2、在新机器上重现环境
conda env create -f environment.yml
此时只有conda环境里的包,还需要把pip管理器中的包也加入,才能像以前一样正常使用
3、导出 requirements.txt
pip freeze > requirements.txt
4、安装requirements.txt (可忽略安装错误)
没有错误,则正常安装
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
遇到错误中断,使用如下命令
while read requirement; do pip install $requirement -i https://pypi.tuna.tsinghua.edu.cn/simple ; done < R6requirements.txt
值得注意的一点
如果你想迁移的环境就是base环境,那么会遇到命名错误的问题,最省事的办法就是换个名字再迁移
conda create -n BBB #将环境克隆,取名为BBB
链接:https://www.jianshu.com/p/4ee474b648af
(R4) zhulab@DESKTOP-574GPKI:~$ conda env export > R4environment.yml
(R4) zhulab@DESKTOP-574GPKI:~$ pip freeze > R4requirements.txt
(R4) zhulab@DESKTOP-574GPKI:~$
(R4) zhulab@DESKTOP-574GPKI:~$ cat R4environment.yml
name: R4
channels:
(R4) zhulab@DESKTOP-574GPKI:~$ cat R4requirements.txt
aioeasywebdav2.4.0
aiohttp @ file:///home/conda/feedstock_root/build_artifacts/aiohttp_1649013150570/work
aiosignal @ file:///home/conda/feedstock_root/build_artifacts/aiosignal_1636093929600/work
alabaster0.7.12
amply @ file:///home/conda/feedstock_root/build_artifacts/amply_1650975715775/work
anndata0.7.8
anyio @ file:///home/conda/feedstock_root/build_artifacts/anyio_1652463872367/work/dist
appdirs @ file:///home/conda/feedstock_root/build_artifacts/appdirs_1603108395799/work
argon2-cffi @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi_1640817743617/work
argon2-cffi-bindings @ file:///home/conda/feedstock_root/build_artifacts/argon2-cffi-bindings_1649500320262/work
async-timeout @ file:///home/conda/feedstock_root/build_artifacts/async-timeout_1640026696943/work
asynctest0.13.0
attmap @ file:///home/conda/feedstock_root/build_artifacts/attmap_1636190286002/work
attrs @ file:///home/conda/feedstock_root/build_artifacts/attrs_1640799537051/work
Babel @ file:///home/conda/feedstock_root/build_artifacts/babel_1655419414885/work
backcall @ file:///home/conda/feedstock_root/build_artifacts/backcall_1592338393461/work
backports.functools-lru-cache @ file:///home/conda/feedstock_root/build_artifacts/backports.functools_lru_cache_1618230623929/work
bash_kernel @ file:///home/conda/feedstock_root/build_artifacts/bash_kernel_1637068786247/work
bcrypt @ file:///home/conda/feedstock_root/build_artifacts/bcrypt_1651441523927/work
beautifulsoup4 @ file:///home/conda/feedstock_root/build_artifacts/beautifulsoup4_1631087867185/work
bleach @ file:///home/conda/feedstock_root/build_artifacts/bleach_1629908509068/work
boto3 @ file:///home/conda/feedstock_root/build_artifacts/boto3_1651914230476/work
botocore @ file:///home/conda/feedstock_root/build_artifacts/botocore_1651876558220/work
brotlipy @ file:///home/conda/feedstock_root/build_artifacts/brotlipy_1648854164153/work
cached-property @ file:///home/conda/feedstock_root/build_artifacts/cached_property_1615209429212/work
cachetools @ file:///home/conda/feedstock_root/build_artifacts/cachetools_1640686991047/work
certifi2022.9.24
cffi @ file:///opt/conda/conda-bld/cffi_1642701102775/work
charset-normalizer @ file:///home/conda/feedstock_root/build_artifacts/charset-normalizer_1644853463426/work
click8.1.3
colorama @ file:///home/conda/feedstock_root/build_artifacts/colorama_1655412516417/work
ConfigArgParse @ file:///home/conda/feedstock_root/build_artifacts/configargparse_1633358864834/work
connection-pool @ file:///home/conda/feedstock_root/build_artifacts/connection_pool_1608581887050/work
cryptography @ file:///home/conda/feedstock_root/build_artifacts/cryptography_1649035231366/work
cycler @ file:///home/conda/feedstock_root/build_artifacts/cycler_1635519461629/work
datrie @ file:///home/conda/feedstock_root/build_artifacts/datrie_1636388972741/work
decorator @ file:///home/conda/feedstock_root/build_artifacts/decorator_1641555617451/work
defusedxml @ file:///home/conda/feedstock_root/build_artifacts/defusedxml_1615232257335/work
diopy0.5.5
docutils @ file:///home/conda/feedstock_root/build_artifacts/docutils_1648737573548/work
dropbox @ file:///home/conda/feedstock_root/build_artifacts/dropbox_1651337304391/work
dunamai @ file:///home/conda/feedstock_root/build_artifacts/dunamai_1651927329982/work
entrypoints @ file:///home/conda/feedstock_root/build_artifacts/entrypoints_1643888246732/work
filechunkio1.8
filelock @ file:///home/conda/feedstock_root/build_artifacts/filelock_1645136850180/work
flit_core @ file:///home/conda/feedstock_root/build_artifacts/flit-core_1645629044586/work/source/flit_core
fonttools @ file:///home/conda/feedstock_root/build_artifacts/fonttools_1657120663890/work
frozenlist @ file:///home/conda/feedstock_root/build_artifacts/frozenlist_1648771692657/work
ftputil @ file:///home/conda/feedstock_root/build_artifacts/ftputil_1643226108482/work
get_version @ file:///home/conda/feedstock_root/build_artifacts/get_version_1644239612226/work/get_version-3.5.4
gitdb @ file:///home/conda/feedstock_root/build_artifacts/gitdb_1635085722655/work
GitPython @ file:///home/conda/feedstock_root/build_artifacts/gitpython_1645531658201/work
google-api-core @ file:///home/conda/feedstock_root/build_artifacts/google-api-core-split_1651860742494/work
google-api-python-client @ file:///home/conda/feedstock_root/build_artifacts/google-api-python-client_1651661108169/work
google-auth @ file:///home/conda/feedstock_root/build_artifacts/google-auth_1650592442422/work
google-auth-httplib2 @ file:///home/conda/feedstock_root/build_artifacts/google-auth-httplib2_1617387471894/work
google-cloud-core @ file:///home/conda/feedstock_root/build_artifacts/google-cloud-core_1642607638110/work
google-cloud-storage @ file:///home/conda/feedstock_root/build_artifacts/google-cloud-storage_1644876711050/work
google-crc32c @ file:///home/conda/feedstock_root/build_artifacts/google-crc32c_1651517221523/work
google-resumable-media @ file:///home/conda/feedstock_root/build_artifacts/google-resumable-media_1635195007097/work
googleapis-common-protos @ file:///home/conda/feedstock_root/build_artifacts/googleapis-common-protos-feedstock_1647557369156/work
grpcio @ file:///home/conda/feedstock_root/build_artifacts/grpcio_1648220659955/work
h5py3.6.0
httplib2 @ file:///home/conda/feedstock_root/build_artifacts/httplib2_1644593570376/work
idna @ file:///home/conda/feedstock_root/build_artifacts/idna_1642433548627/work
igraph0.9.11
imagesize @ file:///home/conda/feedstock_root/build_artifacts/imagesize_1656939531508/work
importlib-metadata4.8.2
importlib-resources @ file:///home/conda/feedstock_root/build_artifacts/importlib_resources_1635615662634/work
iniconfig @ file:///home/conda/feedstock_root/build_artifacts/iniconfig_1603384189793/work
ipykernel @ file:///home/conda/feedstock_root/build_artifacts/ipykernel_1620912939357/work/dist/ipykernel-5.5.5-py3-none-any.whl
ipython @ file:///home/conda/feedstock_root/build_artifacts/ipython_1651240553635/work
ipython-genutils0.2.0
ipywidgets @ file:///home/conda/feedstock_root/build_artifacts/ipywidgets_1647456365981/work
jedi @ file:///home/conda/feedstock_root/build_artifacts/jedi_1649067102072/work
Jinja2 @ file:///home/conda/feedstock_root/build_artifacts/jinja2_1636510082894/work
jmespath @ file:///home/conda/feedstock_root/build_artifacts/jmespath_1647416812516/work
joblib @ file:///home/conda/feedstock_root/build_artifacts/joblib_1633637554808/work
json5 @ file:///home/conda/feedstock_root/build_artifacts/json5_1600692310011/work
jsonschema @ file:///home/conda/feedstock_root/build_artifacts/jsonschema-meta_1642000296051/work
jupyter @ file:///home/conda/feedstock_root/build_artifacts/jupyter_1637233125178/work
jupyter-client @ file:///home/conda/feedstock_root/build_artifacts/jupyter_client_1642858610849/work
jupyter-console @ file:///home/conda/feedstock_root/build_artifacts/jupyter_console_1646669715337/work
jupyter-core @ file:///home/conda/feedstock_root/build_artifacts/jupyter_core_1645024288521/work
jupyter-server @ file:///home/conda/feedstock_root/build_artifacts/jupyter_server_1654636144140/work
jupyterlab @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_1666613090338/work
jupyterlab-pygments @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_pygments_1601375948261/work
jupyterlab-server @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_server_1652878309867/work
jupyterlab-widgets @ file:///home/conda/feedstock_root/build_artifacts/jupyterlab_widgets_1647446862951/work
kiwisolver @ file:///opt/conda/conda-bld/kiwisolver_1653292039266/work
legacy-api-wrap0.0.0
leidenalg0.8.10
liftover1.1.13
llvmlite0.36.0
logmuse @ file:///home/conda/feedstock_root/build_artifacts/logmuse_1594742469765/work
loompy3.0.6
louvain0.7.1
MACS22.2.6
MarkupSafe @ file:///home/conda/feedstock_root/build_artifacts/markupsafe_1648737551960/work
matplotlib3.5.0
matplotlib-inline @ file:///home/conda/feedstock_root/build_artifacts/matplotlib-inline_1631080358261/work
mistune @ file:///home/conda/feedstock_root/build_artifacts/mistune_1635844677043/work
mudata0.1.1
multidict @ file:///home/conda/feedstock_root/build_artifacts/multidict_1648882415996/work
muon0.1.2
natsort8.0.0
nbclassic @ file:///home/conda/feedstock_root/build_artifacts/nbclassic_1647450696711/work
nbclient @ file:///home/conda/feedstock_root/build_artifacts/nbclient_1646999386773/work
nbconvert @ file:///home/conda/feedstock_root/build_artifacts/nbconvert-meta_1649676641343/work
nbformat @ file:///home/conda/feedstock_root/build_artifacts/nbformat_1646951096007/work
nest-asyncio @ file:///home/conda/feedstock_root/build_artifacts/nest-asyncio_1638419302549/work
networkx2.6.3
notebook6.4.12
notebook-shim @ file:///home/conda/feedstock_root/build_artifacts/notebook-shim_1646330736330/work
numba0.53.1
numexpr @ file:///home/conda/feedstock_root/build_artifacts/numexpr_1649636747170/work
numpy1.21.6
numpy-groupies0.9.17
oauth2client4.1.3
olefile @ file:///home/conda/feedstock_root/build_artifacts/olefile_1602866521163/work
packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1637239678211/work
pandas1.3.4
pandocfilters @ file:///home/conda/feedstock_root/build_artifacts/pandocfilters_1631603243851/work
paramiko @ file:///home/conda/feedstock_root/build_artifacts/paramiko_1651022640674/work
parso @ file:///home/conda/feedstock_root/build_artifacts/parso_1638334955874/work
patsy @ file:///home/conda/feedstock_root/build_artifacts/patsy_1632667180946/work
peppy @ file:///home/conda/feedstock_root/build_artifacts/peppy_1637674993563/work
pexpect @ file:///home/conda/feedstock_root/build_artifacts/pexpect_1602535608087/work
pickleshare @ file:///home/conda/feedstock_root/build_artifacts/pickleshare_1602536217715/work
Pillow @ file:///home/conda/feedstock_root/build_artifacts/pillow_1636558793805/work
plac @ file:///home/conda/feedstock_root/build_artifacts/plac_1648653562884/work
plotly5.8.0
pluggy @ file:///home/conda/feedstock_root/build_artifacts/pluggy_1648772594554/work
ply3.11
prettytable @ file:///home/conda/feedstock_root/build_artifacts/prettytable_1651787307815/work
prometheus-client @ file:///home/conda/feedstock_root/build_artifacts/prometheus_client_1643395600215/work
prompt-toolkit @ file:///home/conda/feedstock_root/build_artifacts/prompt-toolkit_1644497866770/work
protobuf3.20.0rc2
psutil @ file:///home/conda/feedstock_root/build_artifacts/psutil_1648872981136/work
ptyprocess @ file:///home/conda/feedstock_root/build_artifacts/ptyprocess_1609419310487/work/dist/ptyprocess-0.7.0-py2.py3-none-any.whl
PuLP @ file:///home/conda/feedstock_root/build_artifacts/pulp_1649461394062/work
py @ file:///home/conda/feedstock_root/build_artifacts/py_1636301881863/work
pyasn10.4.8
pyasn1-modules0.2.7
pycparser @ file:///home/conda/feedstock_root/build_artifacts/pycparser_1636257122734/work
Pygments @ file:///home/conda/feedstock_root/build_artifacts/pygments_1641580240686/work
PyNaCl @ file:///home/conda/feedstock_root/build_artifacts/pynacl_1649519971599/work
pynndescent @ file:///home/conda/feedstock_root/build_artifacts/pynndescent_1652648933546/work
pyOpenSSL @ file:///home/conda/feedstock_root/build_artifacts/pyopenssl_1643496850550/work
pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1642753572664/work
PyQt55.12.3
PyQt5_sip4.19.18
PyQtChart5.12
PyQtWebEngine5.12.1
pyrsistent @ file:///home/conda/feedstock_root/build_artifacts/pyrsistent_1649013358450/work
pysftp0.2.9
PySocks @ file:///home/conda/feedstock_root/build_artifacts/pysocks_1648857264451/work
pytest7.1.2
python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1626286286081/work
python-irodsclient @ file:///home/conda/feedstock_root/build_artifacts/python-irodsclient_1649418034820/work
pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1647961439546/work
pyu2f @ file:///home/conda/feedstock_root/build_artifacts/pyu2f_1604248910016/work
PyYAML @ file:///home/conda/feedstock_root/build_artifacts/pyyaml_1648757092905/work
pyzmq @ file:///home/conda/feedstock_root/build_artifacts/pyzmq_1649055650631/work
qtconsole @ file:///home/conda/feedstock_root/build_artifacts/qtconsole-base_1648505151387/work
QtPy @ file:///home/conda/feedstock_root/build_artifacts/qtpy_1651524593465/work
ratelimiter @ file:///home/conda/feedstock_root/build_artifacts/ratelimiter_1602593436172/work
requests @ file:///home/conda/feedstock_root/build_artifacts/requests_1641580202195/work
retry0.9.2
rsa @ file:///home/conda/feedstock_root/build_artifacts/rsa_1637781155505/work
s3transfer @ file:///home/conda/feedstock_root/build_artifacts/s3transfer_1645745825648/work
scanpy1.9.1
scikit-learn @ file:///home/conda/feedstock_root/build_artifacts/scikit-learn_1640464152916/work
scipy1.7.3
seaborn @ file:///home/conda/feedstock_root/build_artifacts/seaborn-split_1629095986539/work
Send2Trash @ file:///home/conda/feedstock_root/build_artifacts/send2trash_1628511208346/work
session-info1.0.0
setuptools-scm @ file:///home/conda/feedstock_root/build_artifacts/setuptools_scm_1656687828413/work
sinfo @ file:///home/conda/feedstock_root/build_artifacts/sinfo_1597764960136/work
six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work
sklearn0.0
slacker0.14.0
smart-open @ file:///home/conda/feedstock_root/build_artifacts/smart_open_1650793462701/work
smmap @ file:///home/conda/feedstock_root/build_artifacts/smmap_1611376390914/work
snakemake @ file:///opt/conda/conda-bld/snakemake_1651659512367/work
sniffio @ file:///home/conda/feedstock_root/build_artifacts/sniffio_1648819180181/work
snowballstemmer @ file:///home/conda/feedstock_root/build_artifacts/snowballstemmer_1637143057757/work
soupsieve @ file:///home/conda/feedstock_root/build_artifacts/soupsieve_1638550740809/work
Sphinx @ file:///home/conda/feedstock_root/build_artifacts/sphinx_1655452194084/work
sphinxcontrib-applehelp1.0.2
sphinxcontrib-devhelp1.0.2
sphinxcontrib-htmlhelp @ file:///home/conda/feedstock_root/build_artifacts/sphinxcontrib-htmlhelp_1621704829796/work
sphinxcontrib-jsmath1.0.1
sphinxcontrib-qthelp1.0.3
sphinxcontrib-serializinghtml @ file:///home/conda/feedstock_root/build_artifacts/sphinxcontrib-serializinghtml_1649380998999/work
statsmodels0.13.1
stdlib-list @ file:///home/conda/feedstock_root/build_artifacts/stdlib-list_1602639452997/work
stone @ file:///home/conda/feedstock_root/build_artifacts/stone_1643284666238/work
stopit1.1.2
tables3.6.1
tabulate @ file:///home/conda/feedstock_root/build_artifacts/tabulate_1614001031686/work
tbb2021.6.0
tenacity8.0.1
terminado @ file:///home/conda/feedstock_root/build_artifacts/terminado_1649103772573/work
testpath @ file:///home/conda/feedstock_root/build_artifacts/testpath_1645693042223/work
texttable @ file:///home/conda/feedstock_root/build_artifacts/texttable_1626204417032/work
threadpoolctl @ file:///home/conda/feedstock_root/build_artifacts/threadpoolctl_1643647933166/work
tinycss2 @ file:///home/conda/feedstock_root/build_artifacts/tinycss2_1637612658783/work
tomli @ file:///home/conda/feedstock_root/build_artifacts/tomli_1644342247877/work
toposort @ file:///home/conda/feedstock_root/build_artifacts/toposort_1632855988193/work
tornado @ file:///home/conda/feedstock_root/build_artifacts/tornado_1648827244717/work
tqdm4.62.3
traitlets @ file:///home/conda/feedstock_root/build_artifacts/traitlets_1635260543454/work
typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1650370875435/work
ubiquerg @ file:///home/conda/feedstock_root/build_artifacts/ubiquerg_1594677918196/work
umap-learn0.5.2
unicodedata2 @ file:///home/conda/feedstock_root/build_artifacts/unicodedata2_1649111917568/work
uritemplate @ file:///home/conda/feedstock_root/build_artifacts/uritemplate_1634152692041/work
urllib3 @ file:///home/conda/feedstock_root/build_artifacts/urllib3_1647489083693/work
veracitools0.1.3
watermark2.3.1
wcwidth @ file:///home/conda/feedstock_root/build_artifacts/wcwidth_1600965781394/work
webencodings0.5.1
websocket-client @ file:///home/conda/feedstock_root/build_artifacts/websocket-client_1648562593984/work
widgetsnbextension @ file:///home/conda/feedstock_root/build_artifacts/widgetsnbextension_1647446886548/work
wrapt @ file:///home/conda/feedstock_root/build_artifacts/wrapt_1651495229974/work
xgboost1.6.1
xlrd==1.2.0
yarl @ file:///home/conda/feedstock_root/build_artifacts/yarl_1648966511831/work
yte @ file:///home/conda/feedstock_root/build_artifacts/yte_1651890963093/work
zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1643828507773/work
(R4) zhulab@DESKTOP-574GPKI:~$