I\'ve installed and have been using the Anaconda Python distribution, and I have started using the Anaconda (Conda) environment. I can use the standard conda install..
You can start by installing the below given command in the conda environment:
conda install pip
Followed by installing all pip packages you need in the environment.
After installing all the conda and pip packages to export the environment use:
conda env export -n <env-name> > environment.yml
This will create the required file in the folder
conda-env now does this automatically (if pip was installed with conda).
You can see how this works by using the export tool used for migrating an environment:
conda env export -n <env-name> > environment.yml
The file will list both conda packages and pip packages:
name: stats
channels:
- javascript
dependencies:
- python=3.4
- bokeh=0.9.2
- numpy=1.9.*
- nodejs=0.10.*
- flask
- pip:
- Flask-Testing
If you're looking to follow through with exporting the environment, move environment.yml
to the new host machine and run:
conda env create -f path/to/environment.yml
This is why I wrote Picky: http://picky.readthedocs.io/
It's a python package that tracks packages installed with either pip or conda in either virtualenvs and conda envs.
conda env export
lists all conda and pip packages in an environment. conda-env
must be installed in the conda root (conda install -c conda conda-env
).
To write an environment.yml
file describing the current environment:
conda env export > environment.yml
References: