================
Conda Env Export
================
.. image:: https://img.shields.io/pypi/v/conda_env_export.svg
:target: https://pypi.python.org/pypi/conda_env_export
.. image:: https://api.travis-ci.com/luffy-yu/conda_env_export.svg?branch=master
:target: https://app.travis-ci.com/github/luffy-yu/conda_env_export
.. image:: https://readthedocs.org/projects/conda-env-export/badge/?version=latest
:target: https://conda-env-export.readthedocs.io/en/latest/?badge=latest
:alt: Documentation Status
.. image:: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png
:target: https://www.buymeacoffee.com/luffyyu
Export conda env dependencies and pip requirements to ONE yml file.
* Free software: MIT license
* Documentation: https://conda-env-export.readthedocs.io.
Features
--------
* Easy to use
* Flexible options to export
* Support Windows, Linux, and Mac
* Remove duplicated packages automatically
Usage
--------
To use Conda Env Export in a project:
.. code-block:: python
import conda_env_export
To use Conda Env Export in a terminal:
.. code-block:: console
$ conda-env-export --help
Usage: conda-env-export [OPTIONS]
Options:
-n, --name TEXT Name of environment [default: `{activated}`]
--conda-all Output all conda deps [default: False]
--pip-all Output all pip deps [default: False]
--separate Output to separate files [default: False]
--reserve-duplicates Reserve duplicates [default: False]
--include TEXT Force to include deps (ignore case)
--exclude TEXT Force to exclude deps (ignore case)
--extra-pip-requirements Output an extra `requirements.txt` [default: False]
--no-prefix Remove `prefix` in target yml file [default: False]
--to-folder DIRECTORY Where to output the file(s) [default: ./]
--to-file FILE Filename of the output yml file [default: `{activated}`]
--help Show this message and exit.
[RECOMMEND]
Export current activated env, just run:
.. code-block:: console
$ conda-env-export
[RECOMMEND]
Export a named env, e.g. `py37`, run:
.. code-block:: console
$ conda-env-export -n py37
[RECOMMEND]
Export current activated env to separate files (`activated.yml` and `requirements.txt`), just run:
.. code-block:: console
$ conda-env-export --separate
NOTE: `--separate` is different from `--extra-pip-requirements` in the output yml file,
where the yml from `--separate` doesn't explicitly list pip dependencies.
It will use `-r requirements.txt` instead.
[RECOMMEND]
Export current activated env and output an EXTRA pip requirements file, just run:
.. code-block:: console
$ conda-env-export --extra-pip-requirements
WHY: Sometimes it'll fail to install some pip deps when executing `conda env create -f env.yml`,
so it's much more convenient to install pip deps via `pip install -r requirements.txt` rather than
`conda env update -f env.yml --prune`.
Export a named env and ensure that output MUST include `pip` and `PyYAML`, run:
.. code-block:: console
$ conda-env-export -n py37 --include pip --include pyyaml
Export a named env and ensure that output MUST exclude `pip` and `PyYAML`, run:
.. code-block:: console
$ conda-env-export -n py37 --exclude pip --exclude pyyaml
Export with all conda deps and all pip deps of `py37`
.. code-block:: console
$ conda-env-export -n py37 --conda-all --pip-all
Export with all conda deps and all pip deps of `py37`, and DO NOT remove duplicates
.. code-block:: console
$ conda-env-export -n py37 --conda-all --pip-all --reserve-duplicates
Note: The operation of remove duplicates refers to remove those deps in pip, which are already in conda deps.
Credits
-------
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
=======
History
=======
0.6.1 (2024-10-03)
------------------
* Remove menuinst dependency by using `conda==v4.3.16.2`
0.6.0 (2024-09-04)
------------------
* **MAJOR UPDATE**: Support Python 3.11
0.5.1 (2024-08-07)
------------------
* Fix `https://github.com/luffy-yu/conda_env_export/issues/8`
0.5.0 (2024-02-05)
------------------
* Fix `https://github.com/luffy-yu/conda_env_export/issues/5` and `https://github.com/luffy-yu/conda_env_export/issues/6`
0.4.5 (2022-07-26)
------------------
* Fix `https://github.com/luffy-yu/conda_env_export/issues/3` and `https://github.com/luffy-yu/conda_env_export/issues/4`
0.4.4 (2022-07-18)
------------------
* Fix `https://github.com/luffy-yu/conda_env_export/issues/2`
0.4.3 (2021-12-20)
------------------
* Add `python` output in conda section
0.4.2 (2021-12-18)
------------------
* Fix bugs in Windows
0.4.1 (2021-12-17)
------------------
* Replace f'{}' with ''%
0.4.0 (2021-12-17)
------------------
* **MAJOR UPDATE**: Support Windows
0.3.2 (2021-04-14)
------------------
* Add option: `no-prefix`.
0.3.1 (2021-03-07)
------------------
* Update document.
0.3.0 (2021-03-07)
------------------
* Add options: `include` and `exclude`.
* Add option: `extra-pip-requirements`.
0.2.2 (2020-12-19)
------------------
* Update document.
0.2.1 (2020-12-18)
------------------
* Specify pip version.
0.2.0 (2020-12-05)
------------------
* Refactor.
0.1.4 (2020-11-30)
------------------
* Specify pyyaml verison.
0.1.3 (2020-11-29)
------------------
* Fix typo.
0.1.2 (2020-11-29)
------------------
* Overwrite PyPI verison.
0.1.1 (2020-11-29)
------------------
* Update documents.
0.1.0 (2020-11-29)
------------------
* First release on PyPI.
Raw data
{
"_id": null,
"home_page": "https://github.com/luffy-yu/conda_env_export",
"name": "conda-env-export",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.5",
"maintainer_email": null,
"keywords": "conda_env_export",
"author": "Luffy Yu",
"author_email": "yuliuchuan@gmail.com",
"download_url": null,
"platform": null,
"description": "================\nConda Env Export\n================\n\n\n.. image:: https://img.shields.io/pypi/v/conda_env_export.svg\n :target: https://pypi.python.org/pypi/conda_env_export\n\n.. image:: https://api.travis-ci.com/luffy-yu/conda_env_export.svg?branch=master\n :target: https://app.travis-ci.com/github/luffy-yu/conda_env_export\n\n.. image:: https://readthedocs.org/projects/conda-env-export/badge/?version=latest\n :target: https://conda-env-export.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png\n :target: https://www.buymeacoffee.com/luffyyu\n\n\nExport conda env dependencies and pip requirements to ONE yml file.\n\n\n* Free software: MIT license\n* Documentation: https://conda-env-export.readthedocs.io.\n\n\nFeatures\n--------\n\n* Easy to use\n\n* Flexible options to export\n\n* Support Windows, Linux, and Mac\n\n* Remove duplicated packages automatically\n\n\nUsage\n--------\nTo use Conda Env Export in a project:\n\n.. code-block:: python\n\n import conda_env_export\n\nTo use Conda Env Export in a terminal:\n\n.. code-block:: console\n\n $ conda-env-export --help\n Usage: conda-env-export [OPTIONS]\n\n Options:\n -n, --name TEXT Name of environment [default: `{activated}`]\n --conda-all Output all conda deps [default: False]\n --pip-all Output all pip deps [default: False]\n --separate Output to separate files [default: False]\n --reserve-duplicates Reserve duplicates [default: False]\n --include TEXT Force to include deps (ignore case)\n --exclude TEXT Force to exclude deps (ignore case)\n --extra-pip-requirements Output an extra `requirements.txt` [default: False]\n --no-prefix Remove `prefix` in target yml file [default: False]\n --to-folder DIRECTORY Where to output the file(s) [default: ./]\n --to-file FILE Filename of the output yml file [default: `{activated}`]\n --help Show this message and exit.\n\n[RECOMMEND]\n\nExport current activated env, just run:\n\n.. code-block:: console\n\n $ conda-env-export\n\n[RECOMMEND]\n\nExport a named env, e.g. `py37`, run:\n\n.. code-block:: console\n\n $ conda-env-export -n py37\n\n[RECOMMEND]\n\nExport current activated env to separate files (`activated.yml` and `requirements.txt`), just run:\n\n.. code-block:: console\n\n $ conda-env-export --separate\n\nNOTE: `--separate` is different from `--extra-pip-requirements` in the output yml file,\nwhere the yml from `--separate` doesn't explicitly list pip dependencies.\nIt will use `-r requirements.txt` instead.\n\n[RECOMMEND]\n\nExport current activated env and output an EXTRA pip requirements file, just run:\n\n.. code-block:: console\n\n $ conda-env-export --extra-pip-requirements\n\nWHY: Sometimes it'll fail to install some pip deps when executing `conda env create -f env.yml`,\nso it's much more convenient to install pip deps via `pip install -r requirements.txt` rather than\n`conda env update -f env.yml --prune`.\n\nExport a named env and ensure that output MUST include `pip` and `PyYAML`, run:\n\n.. code-block:: console\n\n $ conda-env-export -n py37 --include pip --include pyyaml\n\nExport a named env and ensure that output MUST exclude `pip` and `PyYAML`, run:\n\n.. code-block:: console\n\n $ conda-env-export -n py37 --exclude pip --exclude pyyaml\n\nExport with all conda deps and all pip deps of `py37`\n\n.. code-block:: console\n\n $ conda-env-export -n py37 --conda-all --pip-all\n\nExport with all conda deps and all pip deps of `py37`, and DO NOT remove duplicates\n\n.. code-block:: console\n\n $ conda-env-export -n py37 --conda-all --pip-all --reserve-duplicates\n\nNote: The operation of remove duplicates refers to remove those deps in pip, which are already in conda deps.\n\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n=======\nHistory\n=======\n\n0.6.1 (2024-10-03)\n------------------\n\n* Remove menuinst dependency by using `conda==v4.3.16.2`\n\n0.6.0 (2024-09-04)\n------------------\n\n* **MAJOR UPDATE**: Support Python 3.11\n\n0.5.1 (2024-08-07)\n------------------\n\n* Fix `https://github.com/luffy-yu/conda_env_export/issues/8`\n\n\n0.5.0 (2024-02-05)\n------------------\n\n* Fix `https://github.com/luffy-yu/conda_env_export/issues/5` and `https://github.com/luffy-yu/conda_env_export/issues/6`\n\n\n0.4.5 (2022-07-26)\n------------------\n\n* Fix `https://github.com/luffy-yu/conda_env_export/issues/3` and `https://github.com/luffy-yu/conda_env_export/issues/4`\n\n\n0.4.4 (2022-07-18)\n------------------\n\n* Fix `https://github.com/luffy-yu/conda_env_export/issues/2`\n\n\n0.4.3 (2021-12-20)\n------------------\n\n* Add `python` output in conda section\n\n\n0.4.2 (2021-12-18)\n------------------\n\n* Fix bugs in Windows\n\n\n0.4.1 (2021-12-17)\n------------------\n\n* Replace f'{}' with ''%\n\n\n0.4.0 (2021-12-17)\n------------------\n\n* **MAJOR UPDATE**: Support Windows\n\n\n0.3.2 (2021-04-14)\n------------------\n\n* Add option: `no-prefix`.\n\n\n0.3.1 (2021-03-07)\n------------------\n\n* Update document.\n\n\n0.3.0 (2021-03-07)\n------------------\n\n* Add options: `include` and `exclude`.\n* Add option: `extra-pip-requirements`.\n\n\n0.2.2 (2020-12-19)\n------------------\n\n* Update document.\n\n\n0.2.1 (2020-12-18)\n------------------\n\n* Specify pip version.\n\n\n0.2.0 (2020-12-05)\n------------------\n\n* Refactor.\n\n\n0.1.4 (2020-11-30)\n------------------\n\n* Specify pyyaml verison.\n\n\n0.1.3 (2020-11-29)\n------------------\n\n* Fix typo.\n\n\n0.1.2 (2020-11-29)\n------------------\n\n* Overwrite PyPI verison.\n\n\n0.1.1 (2020-11-29)\n------------------\n\n* Update documents.\n\n\n0.1.0 (2020-11-29)\n------------------\n\n* First release on PyPI.\n\n\n\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "Export conda env dependencies and pip requirements to ONE yml file.",
"version": "0.6.1",
"project_urls": {
"Homepage": "https://github.com/luffy-yu/conda_env_export"
},
"split_keywords": [
"conda_env_export"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "cd8e63fa286d30b7a57b25facd597b265eee760c84e4181c838436b99941d2b1",
"md5": "eb04c00b2921e98612314cabfed449f9",
"sha256": "5b57255e42052a863737c7c8fc9eb3b98528246b1870c789ca63b06e535bbda8"
},
"downloads": -1,
"filename": "conda_env_export-0.6.1-1-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "eb04c00b2921e98612314cabfed449f9",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": ">=3.5",
"size": 9799,
"upload_time": "2024-10-03T20:32:21",
"upload_time_iso_8601": "2024-10-03T20:32:21.403575Z",
"url": "https://files.pythonhosted.org/packages/cd/8e/63fa286d30b7a57b25facd597b265eee760c84e4181c838436b99941d2b1/conda_env_export-0.6.1-1-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-03 20:32:21",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "luffy-yu",
"github_project": "conda_env_export",
"travis_ci": true,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "conda-env-export"
}