Introduction
Packages that cannot be installed with conda are usually installed with pip, but it is possible (and should be) to build and manage packages with conda.
** This method alone is not good because it seems that the required packages are included in both pip and conda. ** ** ** If anyone knows more details, please let me know. ** **
Build with conda and install the packages needed to upload to anaconda.org with conda.
conda install conda-build anaconda-client
Until recently, 64bit Win had a bug, so if you are using windows and already have conda-build, you should update it. Better.
conda update conda-build
As an example, when converting pandas_ml to conda, it looks like this. Create a build recipe with skeleton, build locally, and upload to anaconda.org if needed.
mkdir work
cd work
conda skeleton pypi pandas_ml --version 0.3.0
cd pandas_ml
conda build . --python=3.4
# To have conda build upload to anaconda.org automatically, use
# $ conda config --set anaconda_upload yes
conda build . --output
#>>> <anaconda root>\conda-bld\win-64\pandas_ml-0.3.0-py34_0.tar.bz2
onda install --use-local pandas_ml
Sign up for anaconda.org. It's free if you don't use private.
anaconda login
#>>> Using Anaconda Cloud api site https://api.anaconda.org
#>>> Username: y__sama
#>>> Password:
#>>> login successful
#>>> y__sama's
anaconda upload <anaconda root>\conda-bld\win-64\pandas_ml-0.3.0-py34_0.tar.bz2
If you often upload to anaconda, set conda config --set anaconda_upload yes
.
If you are installing from anaconda.org, you can specify the channel as usual and install.
conda install -c y__sama pandas_ml
I often get errors because the dependent packages can't be installed with conda or aren't listed in the recipe (meta.yaml). If an error occurs, you need to create a separate dependent package with conda build or edit meta.yaml while looking at the message.
http://conda.pydata.org/docs/build_tutorials/pkgs.html#troubleshooting
Environment copy in local
conda create -n env_copy --clone env
Migrate to another server (via file)
If you want to upload to anaconda.org and use it, add a channel.
conda config --add channels y__sama
Export the environment to a file once and specify it with the --file option when creating.
conda list -e > env.txt
conda create -n env_file --file env.txt
But for some reason, both pip and conda are included. .. ..
conda list
#>>> ...Abbreviation
#>>> jsonschema 2.5.1 py35_0 defaults
#>>> jupyter-client 4.2.2 <pip>
#>>> jupyter-cms 0.5.0 <pip>
#>>> jupyter-core 4.1.0 <pip>
#>>> jupyter_client 4.2.2 py35_0 defaults
#>>> jupyter_cms 0.5.0 py35_0 y__sama
#>>> jupyter_core 4.1.0 py35_0 defaults
#>>> libsodium 1.0.3 0 defaults
#>>> ...Abbreviation
Now you should be able to manage packages with just the conda list without using pip freeze and the conda list together.
If you have any details, I would appreciate it if you could comment.
reference
https://gist.github.com/aphlysia/d5fcee79ff81b8272faf http://conda.pydata.org/docs/build_tutorials/pkgs.html http://docs.anaconda.org/cli.html
Recommended Posts