Dear all,
I get the error above when building ggplot with the recipe here:
https://github.com/conda/conda-recipes/tree/master/ggplot
$ conda build ggplot
Traceback (most recent call last):
File "/sebastian/anaconda-test/test-cgat-1/bin/conda-build", line 5, in
sys.exit(main())
File "/sebastian/anaconda-test/test-cgat-1/lib/python2.7/site-packages/conda_build/main_build.py", line 110, in main
args_func(args, p)
File "/sebastian/anaconda-test/test-cgat-1/lib/python2.7/site-packages/conda_build/main_build.py", line 312, in args_func
args.func(args, p)
File "/sebastian/anaconda-test/test-cgat-1/lib/python2.7/site-packages/conda_build/main_build.py", line 244, in execute
m = MetaData(recipe_dir)
File "/sebastian/anaconda-test/test-cgat-1/lib/python2.7/site-packages/conda_build/metadata.py", line 246, in init
self.parse_again()
File "/sebastian/anaconda-test/test-cgat-1/lib/python2.7/site-packages/conda_build/metadata.py", line 254, in parse_again
self.meta = parse(get_contents(self.meta_path))
File "/sebastian/anaconda-test/test-cgat-1/lib/python2.7/site-packages/conda_build/metadata.py", line 221, in get_contents
loaders = [jinja2.PackageLoader('conda_build'),
File "/sebastian/anaconda-test/test-cgat-1/lib/python2.7/site-packages/jinja2/loaders.py", line 212, in init
from pkg_resources import DefaultProvider, ResourceManager,
ImportError: No module named pkg_resources
$ conda info
Current conda install:
platform : linux-64
conda version : 3.7.2
conda-build version : 1.9.0
python version : 2.7.8.final.0
requests version : 2.4.3
root environment : /sebastian/anaconda-test/test-cgat-1 (writable)
default environment : /sebastian/anaconda-test/test-cgat-1
envs directories : /sebastian/anaconda-test/test-cgat-1/envs
package cache : /sebastian/anaconda-test/test-cgat-1/pkgs
channel URLs : https://conda.binstar.org/cgat/linux-64/
http://repo.continuum.io/pkgs/free/linux-64/
http://repo.continuum.io/pkgs/pro/linux-64/
config file : /ifs/home/sebastian/.condarc
is foreign system : False
Any ideas?
Many thanks in advance!
Dear all,
I have tried updating conda to version 3.7.3 but still have the same problem described above.
Thanks!
Dear all,
I have found a solution thanks to this post:
http://stackoverflow.com/questions/7446187/no-module-named-pkg-resources
Just did:
curl https://bootstrap.pypa.io/ez_setup.py | /sebastian/anaconda-test/test-cgat-1/bin/python
and it worked again!
Maybe I am missing something, or you may want to have a look at this problem anyway.
Thanks!
A simpler solution is conda install setuptools.
Hi,
But as you can see here:
https://github.com/conda/conda-recipes/blob/master/ggplot/meta.yaml
setuptools is one of the build requirements. Is not that a solution?
Actually, I checked that setuptools was installed already with:
conda list | grep setuptools
Thanks anyway for your answer!
The issue is that setuptools was not installed into your root environment, where conda is. The build dependencies get installed into the build environment (_build), which is completely separate.
If you already had setuptools installed, then likely you needed to conda install -f setuptools.
That's quite useful to know, many thanks!
Most helpful comment
A simpler solution is
conda install setuptools.