Basically, I decided to manage the package with conda by referring to the following.
Creating a python environment with conda
Basically, follow the above, and if you can't find the package by conda install, Create a recipe for build as shown below, build locally, and from there Once installed, all packages seemed to be manageable under conda.
shell
$ conda skeleton pypi <package name>
$ conda build <package name>
$ conda install --use-local <package name>
However, some packages do not build well, etc. It was a good thing that it didn't go smoothly.
When I tried to put the basemap package which is a toolkit of matplotlib, The recipe making (conda skeleton pypi basemap) goes well, but At build time, I was angry that there was no numpy.
shell
ImportError: No module named numpy
Of course numpy is included. After a lot of research, I found the following that was in the same situation.
conda build - ImportError: No module named numpy
According to this, it was written that the meta.yaml file should be edited, so Under the directory where conda skeleton pypi basemap was executed Below the meta.yaml file under the basemap directory
meta.yaml
requirements:
build:
- python
run:
- python
The part that was
meta.yaml
requirements:
build:
- python
- numpy
run:
- python
- numpy
- matplotlib
After fixing it, I was able to build and install it safely. (* I wrote matplotlib in run only with numpy, but I passed the build, After that, it failed during the test without matplotlib)
I didn't have much information in Japanese, so I made a note for the time being.
--------- 20161204 postscript ---------
One day
shell
$ conda skeleton pypi <package name>
I got an error.
[conda skeleton pypi throws xmlrpc.client.Fault] (https://github.com/conda/conda-build/issues/1207)
It was similar to the error in, and looked like a bug in conda-build. It was a bug that had already been fixed, so
shell
$ conda install -n root conda-build
After updating condo-build to the latest version, it was solved safely.
Recommended Posts