yml file install doesn't work
mhearne-usgs opened this issue · 10 comments
I tried to create the conda environment using the supplied command and got the error below:
conda env create -f environment.yml
Traceback (most recent call last):
File "/Users/mhearne/miniconda3/bin/conda-env", line 6, in
sys.exit(main())
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/conda_env/cli/main.py", line 68, in main
return args_func(args, parser)
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/conda/cli/main.py", line 146, in args_func
args.func(args, p)
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/conda_env/cli/main_create.py", line 78, in execute
directory=os.getcwd())
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/conda_env/specs/init.py", line 20, in detect
if spec.can_handle():
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/conda_env/specs/yaml_file.py", line 14, in can_handle
self._environment = env.from_file(self.filename)
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/conda_env/env.py", line 65, in from_file
return from_yaml(fp.read(), filename=filename)
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/conda_env/env.py", line 54, in from_yaml
data = yaml.load(yamlstr)
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/yaml/init.py", line 72, in load
return loader.get_single_data()
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/yaml/constructor.py", line 35, in get_single_data
node = self.get_single_node()
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/yaml/composer.py", line 36, in get_single_node
document = self.compose_document()
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/yaml/composer.py", line 58, in compose_document
self.get_event()
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/yaml/parser.py", line 118, in get_event
self.current_event = self.state()
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/yaml/parser.py", line 193, in parse_document_end
token = self.peek_token()
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/yaml/scanner.py", line 128, in peek_token
self.fetch_more_tokens()
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/yaml/scanner.py", line 220, in fetch_more_tokens
return self.fetch_value()
File "/Users/mhearne/miniconda3/lib/python3.5/site-packages/yaml/scanner.py", line 580, in fetch_value
self.get_mark())
yaml.scanner.ScannerError: mapping values are not allowed here
in "", line 7, column 19:
<head prefix="og: http://ogp.me/ns# fb: http://o ...
Sorry for the trouble. I'm on a bus right now but I'll take a look as soon as I'm in front of a computer
Hmm, I can't reproduce this. Can you try updating conda
?
conda update conda
alternatively, you can just run this command if the environment
file is still acting up:
conda create -n numbatutorial python=3.5 numpy matplotlib numba=0.26.0 line_profiler jupyter ipython
That second suggestion worked, but the environment file was still generating the same error.
The environment file I was using before was HTML, not yaml. I grabbed the file from the repository using this command:
wget https://raw.githubusercontent.com/barbagroup/numba_tutorial_scipy2016/master/environment.yml
I then tried to create the environment from that file, and got the following results on my Mac (10.10.5).
conda env create -f environment.yml
Using Anaconda Cloud api site https://api.anaconda.org
Using Anaconda Cloud api site https://api.anaconda.org
Using Anaconda Cloud api site https://api.anaconda.org
Fetching package metadata .............
Solving package specifications: .
Error: Packages missing in current osx-64 channels:
- fontconfig 2.11.1 5
- zeromq 4.1.4 0
@mhearne-usgs well that's annoying. Sorry for the trouble! If you installed the packages above then you don't need the environment file. It's just supposed to be a "convenience" for getting everything installed.
You should go ahead and clone the entire repository using git
since we'll be working off of the jupyter notebooks during the tutorial.
Had the same issue with the environment.yml
Based on the install instructions above, here's a different environment.yml to use:
name: numbatutorial
dependencies:
- python=3.5
- numpy
- matplotlib
- numba=0.26.0
- line_profiler
- jupyter
- ipython
This worked for me on OSX 10.11 (where as the original environment.yml was broken as above).
Thanks, @dopplershift -- if you care to open a PR with that I'll happily merge it in.
See #3 .