Conda Environment Configuration Issue (OSX Lion 10.7)
Closed this issue ยท 5 comments
When I run "conda env create -n astropy-workshop --file environment.yml" in my Mac terminal, I get the following errors:
Building wheels for collected packages: asdf, bottleneck
Building wheel for asdf (PEP 517): started
Building wheel for asdf (PEP 517): finished with status 'done'
Created wheel for asdf: filename=asdf-2.4.2-cp37-none-any.whl size=502586 sha256=67a0dfe6b83fd8b236fbfff7280588f39f6a45bc00f2f537a4e919432a55d689
Stored in directory: /Users/nicole/Library/Caches/pip/wheels/6f/d7/fa/82c25695e6702be6355313a5cf46779a320ce227e8d8a18a54
Building wheel for bottleneck (PEP 517): started
Building wheel for bottleneck (PEP 517): finished with status 'error'
Running setup.py clean for bottleneck
Successfully built asdf
Failed to build bottleneck
Building wheels for collected packages: gwcs, astroquery, pyyaml, pyopengl, dill
Building wheel for gwcs (setup.py): started
Building wheel for gwcs (setup.py): finished with status 'done'
Created wheel for gwcs: filename=gwcs-0.11.0-cp37-none-any.whl size=82407 sha256=2a50d2dbc4fb22f8ca1841ab638cca9d94650aa6ccab852ff8d74e03e3f63974
Stored in directory: /Users/nicole/Library/Caches/pip/wheels/ad/31/9b/b230003f56de11de1be69cbc040b35e91ba23ac3a64f0ab024
Building wheel for astroquery (setup.py): started
Building wheel for astroquery (setup.py): finished with status 'done'
Created wheel for astroquery: filename=astroquery-0.4.dev0-cp37-none-any.whl size=3514272 sha256=cf4efb6e4df89968aa3b4c3e1bb97a8e33b3273eb9b7c21a67c3e1572c01fe05
Stored in directory: /Users/nicole/Library/Caches/pip/wheels/27/60/eb/678794ad1072bd63df6d9789e75937f07afeea75fa1d26c8e6
Building wheel for pyyaml (setup.py): started
Building wheel for pyyaml (setup.py): finished with status 'done'
Created wheel for pyyaml: filename=PyYAML-5.2-cp37-cp37m-macosx_10_7_x86_64.whl size=44214 sha256=20ca74f8922ba117b0f07dcf613cadb319f0763d18282ab306e62120c2da0252
Stored in directory: /Users/nicole/Library/Caches/pip/wheels/54/b7/c7/2ada654ee54483c9329871665aaf4a6056c3ce36f29cf66e67
Building wheel for pyopengl (setup.py): started
Building wheel for pyopengl (setup.py): finished with status 'done'
Created wheel for pyopengl: filename=PyOpenGL-3.1.4-cp37-none-any.whl size=2425624 sha256=5600b900553f97522a06a3ee02b0478f97c1599e703d3e11c0a44a0e739b9972
Stored in directory: /Users/nicole/Library/Caches/pip/wheels/39/44/6b/239187835bc6e8aa26e337ea11f80dcac0d1f03d08625ec177
Building wheel for dill (setup.py): started
Building wheel for dill (setup.py): finished with status 'done'
Created wheel for dill: filename=dill-0.3.1.1-cp37-none-any.whl size=78533 sha256=46ca05fa92ba4a2d42d052a1eba6bb5339ff74232ca36cacb9fb3e0c6b7a2b54
Stored in directory: /Users/nicole/Library/Caches/pip/wheels/59/b1/91/f02e76c732915c4015ab4010f3015469866c1eb9b14058d8e7
Successfully built gwcs astroquery pyyaml pyopengl dill
Pip subprocess error:
ERROR: Command errored out with exit status 1:
command: /anaconda3/envs/astropy-workshop/bin/python /anaconda3/envs/astropy-workshop/lib/python3.7/site-packages/pip/_vendor/pep517/_in_process.py build_wheel /var/folders/mg/0m4bngzn3pvfh6ksy0z9ccs40000gn/T/tmp7s45_avo
cwd: /private/var/folders/mg/0m4bngzn3pvfh6ksy0z9ccs40000gn/T/pip-install-slppdtx4/bottleneck
Complete output (89 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.7-x86_64-3.7
creating build/lib.macosx-10.7-x86_64-3.7/bottleneck
copying bottleneck/_version.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck
copying bottleneck/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck
copying bottleneck/_pytesttester.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck
creating build/lib.macosx-10.7-x86_64-3.7/bottleneck/benchmark
copying bottleneck/benchmark/bench_detailed.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/benchmark
copying bottleneck/benchmark/autotimeit.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/benchmark
copying bottleneck/benchmark/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/benchmark
copying bottleneck/benchmark/bench.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/benchmark
creating build/lib.macosx-10.7-x86_64-3.7/bottleneck/slow
copying bottleneck/slow/reduce.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/slow
copying bottleneck/slow/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/slow
copying bottleneck/slow/nonreduce.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/slow
copying bottleneck/slow/move.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/slow
copying bottleneck/slow/nonreduce_axis.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/slow
creating build/lib.macosx-10.7-x86_64-3.7/bottleneck/tests
copying bottleneck/tests/nonreduce_axis_test.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/tests
copying bottleneck/tests/scalar_input_test.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/tests
copying bottleneck/tests/reduce_test.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/tests
copying bottleneck/tests/util.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/tests
copying bottleneck/tests/move_test.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/tests
copying bottleneck/tests/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/tests
copying bottleneck/tests/input_modification_test.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/tests
copying bottleneck/tests/nonreduce_test.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/tests
copying bottleneck/tests/list_input_test.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/tests
copying bottleneck/tests/memory_test.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/tests
creating build/lib.macosx-10.7-x86_64-3.7/bottleneck/src
copying bottleneck/src/bn_config.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/src
copying bottleneck/src/__init__.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/src
copying bottleneck/src/bn_template.py -> build/lib.macosx-10.7-x86_64-3.7/bottleneck/src
UPDATING build/lib.macosx-10.7-x86_64-3.7/bottleneck/_version.py
set build/lib.macosx-10.7-x86_64-3.7/bottleneck/_version.py to '1.3.1'
running build_ext
running config
compiling '_configtest.c':
#pragma GCC diagnostic error "-Wattributes"
int __attribute__((optimize("O3"))) have_attribute_optimize_opt_3(void*);
int main(void)
{
return 0;
}
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/astropy-workshop/include -arch x86_64 -I/anaconda3/envs/astropy-workshop/include -arch x86_64 -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
compiling '_configtest.c':
#ifndef __cplusplus
static inline int static_func (void)
{
return 0;
}
inline int nostatic_func (void)
{
return 0;
}
#endif
int main(void) {
int r1 = static_func();
int r2 = nostatic_func();
return r1 + r2;
}
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/astropy-workshop/include -arch x86_64 -I/anaconda3/envs/astropy-workshop/include -arch x86_64 -c _configtest.c -o _configtest.o
success!
removing: _configtest.c _configtest.o
building 'bottleneck.reduce' extension
creating build/temp.macosx-10.7-x86_64-3.7
creating build/temp.macosx-10.7-x86_64-3.7/bottleneck
creating build/temp.macosx-10.7-x86_64-3.7/bottleneck/src
gcc -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I/anaconda3/envs/astropy-workshop/include -arch x86_64 -I/anaconda3/envs/astropy-workshop/include -arch x86_64 -I/private/var/folders/mg/0m4bngzn3pvfh6ksy0z9ccs40000gn/T/pip-build-env-2nnla3c2/overlay/lib/python3.7/site-packages/numpy/core/include -I/anaconda3/envs/astropy-workshop/include/python3.7m -Ibottleneck/src -c bottleneck/src/reduce.c -o build/temp.macosx-10.7-x86_64-3.7/bottleneck/src/reduce.o -O2
In file included from /usr/local/lib/gcc/x86_64-apple-darwin18.5.0/8.3.0/include-fixed/syslimits.h:7,
from /usr/local/lib/gcc/x86_64-apple-darwin18.5.0/8.3.0/include-fixed/limits.h:34,
from /anaconda3/envs/astropy-workshop/include/python3.7m/Python.h:11,
from bottleneck/src/bottleneck.h:6,
from bottleneck/src/reduce.c:3:
/usr/local/lib/gcc/x86_64-apple-darwin18.5.0/8.3.0/include-fixed/limits.h:194:15: fatal error: limits.h: No such file or directory
#include_next <limits.h> /* recurse down to the real one */
^~~~~~~~~~
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for bottleneck
ERROR: Could not build wheels for bottleneck which use PEP 517 and cannot be installed directly
CondaEnvException: Pip failed
**According to check_env.py, I was able/unable to install the following**
Found IPython 7.10.2
Found cython 0.29.14
Found jupyter
Found notebook 6.0.2
Found numpy 1.17.4
Found scipy 1.3.1
Found skimage 0.15.0
Found matplotlib 3.1.1
Found pandas 0.25.3
Error: Failed import: No module named 'bs4'
Error: Failed import: No module named 'keyring'
Error: Failed import: No module named 'html5lib'
Error: Failed import: No module named 'xlwt'
Error: Failed import: No module named 'requests'
Error: Failed import: No module named 'jupyterlab'
Error: Failed import: No module named 'astropy'
Error: Failed import: No module named 'asdf'
Error: Failed import: No module named 'gwcs'
Error: Failed import: No module named 'photutils'
Error: Failed import: No module named 'specutils'
Error: Failed import: No module named 'glue_vispy_viewers'
Error: Failed import: No module named 'glue'
Error: Failed import: No module named 'astroquery'
There are errors that you must resolve before running the tutorials.
@nicole-crumpler0230 thank you for opening an issue with the details of the problems you encountered while following installation instructions for the Astropy workshop. It appears that most, if not all, of the packages meant to be installed by "pip" failed to install.
At first glance, I suspect that Mac OS X 10.7 (Lion) may be too far out of date for the installations done by pip. Is upgrading the operating system a possibility?
The workshop team will discuss this and get back to you. By the time of the workshop, we anticipate having ready some alternative methods to run the workshop software as a backup for cases like yours.
I notice that this issue is the first one you've ever opened on Github -- welcome to the community! We really appreciate your feedback about the installation instructions and we look forward to working with you to make sure you can get a lot out of the workshop.
@astrofrog asked a very good question on Slack. Why is pip
pulling in bottleneck
? I inspected the dependencies of several packages defined in the environment YAML file but I cannot find any that listed bottleneck
as a hard dependency in setup.cfg
or setup.py
.
I am using anaconda on Windows 10. I also encountered an error message related to bottleneck problem. It was related to installing the package "glue_vispy_viewers."
Specifically, the error message eventually pointed to:
error: Microsoft Visual C++ 14.0 is required. Get it with "Microsoft Visual C++ Build Tools"
I tried many different things including:
- installing 2019 Microsoft VS
- pip install glue_vispy_viewers
- conda install glue-vispy-viewers
- conda install -c conda-forge glue-vispy-viewers
- Restart the console
- Restart the computer
- repeat the above steps in random order
And I think I successfully get it to install...
๐ @liweihung , thank you very much for your persistence and reporting back! Thanks to your hint to look at glue-vispy-viewers
, I think I found the culprit that pulls in bottleneck
:
https://github.com/glue-viz/glue/blob/ff949ad52e205c20561f48c05f870b2abb39e0b0/setup.cfg#L44
This resulted in more questions than answers:
- Why is
glue-core
requiringbottleneck
? (Turns out they use it for some NaN handling.) - Why do we require
glue-core
? (See #123)
Also glue-core is in conda in the glueviz channel so if that was installed bottleneck would be installed with conda.