Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pip install sherpa bug #828

Closed
klaykulik opened this issue Jun 16, 2020 · 23 comments
Closed

Pip install sherpa bug #828

klaykulik opened this issue Jun 16, 2020 · 23 comments

Comments

@klaykulik
Copy link

Sherpa does not seem to want to install on a clean venv using Pip, but installs fine with conda.

Commands Only:

(base)$ conda create -n sherpa_test python=3.6
(base)$ conda activate sherpa_test
(sherpa_test)$ pip install sherpa
(sherpa_test)$ pip install numpy
(sherpa_test)$ pip freeze
(sherpa_test)$ pip install sherpa
(sherpa_test)$ pip freeze
(sherpa_test)$ conda install -n sherpa_test -c sherpa sherpa
(sherpa_test)$ pip freeze

Commands and output/errors:

(base)$ conda create -n sherpa_test python=3.6
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/kulik/Programs/anaconda3/envs/sherpa_test

  added / updated specs:
    - python=3.6


The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  ca-certificates    pkgs/main/linux-64::ca-certificates-2020.1.1-0
  certifi            pkgs/main/linux-64::certifi-2020.4.5.2-py36_0
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.33.1-h53a641e_7
  libedit            pkgs/main/linux-64::libedit-3.1.20181209-hc058e9b_0
  libffi             pkgs/main/linux-64::libffi-3.3-he6710b0_1
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  ncurses            pkgs/main/linux-64::ncurses-6.2-he6710b0_1
  openssl            pkgs/main/linux-64::openssl-1.1.1g-h7b6447c_0
  pip                pkgs/main/linux-64::pip-20.0.2-py36_3
  python             pkgs/main/linux-64::python-3.6.10-h7579374_2
  readline           pkgs/main/linux-64::readline-8.0-h7b6447c_0
  setuptools         pkgs/main/linux-64::setuptools-47.1.1-py36_0
  sqlite             pkgs/main/linux-64::sqlite-3.31.1-h62c20be_1
  tk                 pkgs/main/linux-64::tk-8.6.8-hbc83047_0
  wheel              pkgs/main/linux-64::wheel-0.34.2-py36_0
  xz                 pkgs/main/linux-64::xz-5.2.5-h7b6447c_0
  zlib               pkgs/main/linux-64::zlib-1.2.11-h7b6447c_3


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
#
# To activate this environment, use
#
#     $ conda activate sherpa_test
#
# To deactivate an active environment, use
#
#     $ conda deactivate

(base) [kulik@redwood ~]$ conda activate sherpa_test
(sherpa_test) [kulik@redwood ~]$ pip install sherpa
Collecting sherpa
  Using cached sherpa-4.12.0.tar.gz (11.5 MB)
    ERROR: Command errored out with exit status 2:
     command: /home/kulik/Programs/anaconda3/envs/sherpa_test/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0bc6yhu3/sherpa/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0bc6yhu3/sherpa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-0bc6yhu3/sherpa/pip-egg-info
         cwd: /tmp/pip-install-0bc6yhu3/sherpa/
    Complete output (3 lines):
    You need to install NUMPY in order to build Sherpa
    Other dependencies will be automatically installed
    Please install NUMPY (e.g. pip install numpy) and try again.
    ----------------------------------------
ERROR: Command errored out with exit status 2: python setup.py egg_info Check the logs for full command output.
(sherpa_test) [kulik@redwood ~]$ pip install numpy
Collecting numpy
  Using cached numpy-1.18.5-cp36-cp36m-manylinux1_x86_64.whl (20.1 MB)
Installing collected packages: numpy
Successfully installed numpy-1.18.5
(sherpa_test) [kulik@redwood ~]$ pip freeze
certifi==2020.4.5.2
numpy==1.18.5
pymultinest==2.9
(sherpa_test) [kulik@redwood ~]$ pip install sherpa
Collecting sherpa
  Using cached sherpa-4.12.0.tar.gz (11.5 MB)
Requirement already satisfied: numpy in ./Programs/anaconda3/envs/sherpa_test/lib/python3.6/site-packages (from sherpa) (1.18.5)
Building wheels for collected packages: sherpa
  Building wheel for sherpa (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/kulik/Programs/anaconda3/envs/sherpa_test/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8mjk58k8/sherpa/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8mjk58k8/sherpa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-6qz20khc
       cwd: /tmp/pip-install-8mjk58k8/sherpa/
  Complete output (374 lines):
  running sherpa_config
  warning: sherpa_config: built configure string['./configure', '--prefix=/tmp/pip-install-8mjk58k8/sherpa/build', '--with-pic', '--enable-standalone', '--disable-maintainer-mode', '--enable-stuberrorlib', '--disable-shared', '--enable-shared=libgrp,stklib', '--enable-fftw', '--enable-region', '--enable-group', '--enable-stk', '--enable-wcs']
  
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
  checking for gawk... gawk
  checking whether make sets $(MAKE)... yes
  checking whether make supports nested variables... yes
  checking whether to enable maintainer-specific portions of Makefiles... no
  checking build system type... x86_64-pc-linux-gnu
  checking host system type... x86_64-pc-linux-gnu
  checking how to print strings... printf
  checking whether make supports the include directive... yes (GNU style)
  checking for gcc... gcc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables...
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether gcc accepts -g... yes
  checking for gcc option to accept ISO C89... none needed
  checking whether gcc understands -c and -o together... yes
  checking dependency style of gcc... gcc3
  checking for a sed that does not truncate output... /usr/bin/sed
  checking for grep that handles long lines and -e... /usr/bin/grep
  checking for egrep... /usr/bin/grep -E
  checking for fgrep... /usr/bin/grep -F
  checking for ld used by gcc... /usr/bin/ld
  checking if the linker (/usr/bin/ld) is GNU ld... yes
  checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
  checking the name lister (/usr/bin/nm -B) interface... BSD nm
  checking whether ln -s works... yes
  checking the maximum length of command line arguments... 1572864
  checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
  checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
  checking for /usr/bin/ld option to reload object files... -r
  checking for objdump... objdump
  checking how to recognize dependent libraries... pass_all
  checking for dlltool... no
  checking how to associate runtime and link libraries... printf %s\n
  checking for ar... ar
  checking for archiver @FILE support... @
  checking for strip... strip
  checking for ranlib... ranlib
  checking command to parse /usr/bin/nm -B output from gcc object... ok
  checking for sysroot... no
  checking for a working dd... /usr/bin/dd
  checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
  checking for mt... no
  checking if : is a manifest tool... no
  checking how to run the C preprocessor... gcc -E
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking for dlfcn.h... yes
  checking for objdir... .libs
  checking if gcc supports -fno-rtti -fno-exceptions... no
  checking for gcc option to produce PIC... -fPIC -DPIC
  checking if gcc PIC flag -fPIC -DPIC works... yes
  checking if gcc static flag -static works... no
  checking if gcc supports -c -o file.o... yes
  checking if gcc supports -c -o file.o... (cached) yes
  checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
  checking dynamic linker characteristics... GNU/Linux ld.so
  checking how to hardcode library paths into programs... immediate
  checking whether stripping libraries is possible... yes
  checking if libtool supports shared libraries... yes
  checking whether to build shared libraries... no
  checking whether to build static libraries... yes
  checking that generated files are newer than configure... done
  configure: creating ./config.status
  config.status: creating Makefile
  config.status: executing depfiles commands
  config.status: executing libtool commands
  === configuring in fftw-3.3.8 (/tmp/pip-install-8mjk58k8/sherpa/extern/fftw-3.3.8)
  configure: running /bin/sh ./configure --disable-option-checking '--prefix=/tmp/pip-install-8mjk58k8/sherpa/build'  '--with-pic' '--enable-standalone' '--disable-maintainer-mode' '--enable-stuberrorlib' '--disable-shared' '--enable-shared=libgrp,stklib' '--enable-fftw' '--enable-region' '--enable-group' '--enable-stk' '--enable-wcs' --cache-file=/dev/null --srcdir=.
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
  checking for gawk... gawk
  checking whether make sets $(MAKE)... yes
  checking whether make supports nested variables... yes
  checking whether to enable maintainer-specific portions of Makefiles... no
  checking build system type... x86_64-pc-linux-gnu
  checking host system type... x86_64-pc-linux-gnu
  checking for gcc... gcc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables...
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether gcc accepts -g... yes
  checking for gcc option to accept ISO C89... none needed
  checking whether gcc understands -c and -o together... yes
  checking for style of include used by make... GNU
  checking dependency style of gcc... gcc3
  checking for C compiler vendor... gnu
  checking for gcc option to accept ISO C99... none needed
  checking for gcc option to accept ISO Standard C... (cached) none needed
  checking whether ln -s works... yes
  checking whether make sets $(MAKE)... (cached) yes
  checking how to print strings... printf
  checking for a sed that does not truncate output... /usr/bin/sed
  checking for grep that handles long lines and -e... /usr/bin/grep
  checking for egrep... /usr/bin/grep -E
  checking for fgrep... /usr/bin/grep -F
  checking for ld used by gcc... /usr/bin/ld
  checking if the linker (/usr/bin/ld) is GNU ld... yes
  checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
  checking the name lister (/usr/bin/nm -B) interface... BSD nm
  checking the maximum length of command line arguments... 1572864
  checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
  checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
  checking for /usr/bin/ld option to reload object files... -r
  checking for objdump... objdump
  checking how to recognize dependent libraries... pass_all
  checking for dlltool... dlltool
  checking how to associate runtime and link libraries... printf %s\n
  checking for ar... ar
  checking for archiver @FILE support... @
  checking for strip... strip
  checking for ranlib... ranlib
  checking command to parse /usr/bin/nm -B output from gcc object... ok
  checking for sysroot... no
  checking for a working dd... /usr/bin/dd
  checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
  checking for mt... no
  checking if : is a manifest tool... no
  checking how to run the C preprocessor... gcc -E
  checking for ANSI C header files... yes
  checking for sys/types.h... yes
  checking for sys/stat.h... yes
  checking for stdlib.h... yes
  checking for string.h... yes
  checking for memory.h... yes
  checking for strings.h... yes
  checking for inttypes.h... yes
  checking for stdint.h... yes
  checking for unistd.h... yes
  checking for dlfcn.h... yes
  checking for objdir... .libs
  checking if gcc supports -fno-rtti -fno-exceptions... no
  checking for gcc option to produce PIC... -fPIC -DPIC
  checking if gcc PIC flag -fPIC -DPIC works... yes
  checking if gcc static flag -static works... no
  checking if gcc supports -c -o file.o... yes
  checking if gcc supports -c -o file.o... (cached) yes
  checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
  checking dynamic linker characteristics... GNU/Linux ld.so
  checking how to hardcode library paths into programs... immediate
  checking whether stripping libraries is possible... yes
  checking if libtool supports shared libraries... yes
  checking whether to build shared libraries... no
  checking whether to build static libraries... yes
  checking for ranlib... (cached) ranlib
  checking for ocamlbuild... no
  checking whether C compiler accepts -mtune=native... yes
  checking whether C compiler accepts -malign-double... yes
  checking whether C compiler accepts -fstrict-aliasing... yes
  checking whether C compiler accepts -fno-schedule-insns... yes
  checking whether C compiler accepts -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns... yes
  checking for ANSI C header files... (cached) yes
  checking fcntl.h usability... yes
  checking fcntl.h presence... yes
  checking for fcntl.h... yes
  checking fenv.h usability... yes
  checking fenv.h presence... yes
  checking for fenv.h... yes
  checking limits.h usability... yes
  checking limits.h presence... yes
  checking for limits.h... yes
  checking malloc.h usability... yes
  checking malloc.h presence... yes
  checking for malloc.h... yes
  checking stddef.h usability... yes
  checking stddef.h presence... yes
  checking for stddef.h... yes
  checking sys/time.h usability... yes
  checking sys/time.h presence... yes
  checking for sys/time.h... yes
  checking altivec.h usability... no
  checking altivec.h presence... no
  checking for altivec.h... no
  checking for an ANSI C-conforming const... yes
  checking for inline... inline
  checking for size_t... yes
  checking for uint32_t... yes
  checking for uint64_t... yes
  checking whether time.h and sys/time.h may both be included... yes
  checking for long double... yes
  checking for hrtime_t... no
  checking size of int... 4
  checking size of unsigned int... 4
  checking size of long... 8
  checking size of unsigned long... 8
  checking size of long long... 8
  checking size of unsigned long long... 8
  checking size of size_t... 8
  checking size of ptrdiff_t... 8
  checking for ptrdiff_t... yes
  checking for uintptr_t... yes
  checking size of float... 4
  checking size of double... 8
  checking size of fftw_r2r_kind... 4
  checking for working alloca.h... yes
  checking for alloca... yes
  checking for working strtod... yes
  checking for vprintf... yes
  checking for _doprnt... no
  checking for sin in -lm... yes
  checking for BSDgettimeofday... no
  checking for gettimeofday... yes
  checking for gethrtime... no
  checking for read_real_time... no
  checking for time_base_to_time... no
  checking for drand48... yes
  checking for sqrt... yes
  checking for memset... yes
  checking for posix_memalign... yes
  checking for memalign... yes
  checking for _mm_malloc... no
  checking for _mm_free... no
  checking for clock_gettime... yes
  checking for mach_absolute_time... no
  checking for sysctl... yes
  checking for abort... yes
  checking for sinl... yes
  checking for cosl... yes
  checking for snprintf... yes
  checking for memmove... yes
  checking for strchr... yes
  checking for getpagesize... yes
  checking whether sinl is declared... yes
  checking whether cosl is declared... yes
  checking whether sinq is declared... no
  checking whether cosq is declared... no
  checking whether memalign is declared... yes
  checking whether drand48 is declared... yes
  checking whether srand48 is declared... yes
  checking whether posix_memalign is declared... yes
  checking for _rtc intrinsic... no
  checking for isnan... yes
  checking whether C compiler accepts -mpreferred-stack-boundary=4... yes
  checking whether the stack is at least 8-byte aligned by gcc... checking whether C compiler accepts -malign-double... (cached) yes
  yes
  checking for g77... no
  checking for xlf... no
  checking for f77... no
  checking for frt... no
  checking for pgf77... no
  checking for cf77... no
  checking for fort77... no
  checking for fl32... no
  checking for af77... no
  checking for xlf90... no
  checking for f90... no
  checking for pgf90... no
  checking for pghpf... no
  checking for epcf90... no
  checking for gfortran... gfortran
  checking whether we are using the GNU Fortran 77 compiler... yes
  checking whether gfortran accepts -g... yes
  checking if libtool supports shared libraries... yes
  checking whether to build shared libraries... no
  checking whether to build static libraries... yes
  checking for gfortran option to produce PIC... -fPIC
  checking if gfortran PIC flag -fPIC works... yes
  checking if gfortran static flag -static works... no
  checking if gfortran supports -c -o file.o... yes
  checking if gfortran supports -c -o file.o... (cached) yes
  checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
  checking dynamic linker characteristics... (cached) GNU/Linux ld.so
  checking how to hardcode library paths into programs... immediate
  checking how to get verbose linking output from gfortran... -v
  checking for Fortran 77 libraries of gfortran...  -L/usr/lib/gcc/x86_64-redhat-linux/9 -L/usr/lib/gcc/x86_64-redhat-linux/9/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/9/../../.. -lgfortran -lm -lquadmath
  checking for dummy main to link with Fortran 77 libraries... none
  checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
  checking whether a cycle counter is available... yes
  checking that generated files are newer than configure... done
  configure: creating ./config.status
  config.status: creating Makefile
  config.status: creating support/Makefile
  config.status: creating genfft/Makefile
  config.status: creating kernel/Makefile
  config.status: creating simd-support/Makefile
  config.status: creating dft/Makefile
  config.status: creating dft/scalar/Makefile
  config.status: creating dft/scalar/codelets/Makefile
  config.status: creating dft/simd/Makefile
  config.status: creating dft/simd/common/Makefile
  config.status: creating dft/simd/sse2/Makefile
  config.status: creating dft/simd/avx/Makefile
  config.status: creating dft/simd/avx-128-fma/Makefile
  config.status: creating dft/simd/avx2/Makefile
  config.status: creating dft/simd/avx2-128/Makefile
  config.status: creating dft/simd/avx512/Makefile
  config.status: creating dft/simd/kcvi/Makefile
  config.status: creating dft/simd/altivec/Makefile
  config.status: creating dft/simd/vsx/Makefile
  config.status: creating dft/simd/neon/Makefile
  config.status: creating dft/simd/generic-simd128/Makefile
  config.status: creating dft/simd/generic-simd256/Makefile
  config.status: creating rdft/Makefile
  config.status: creating rdft/scalar/Makefile
  config.status: creating rdft/scalar/r2cf/Makefile
  config.status: creating rdft/scalar/r2cb/Makefile
  config.status: creating rdft/scalar/r2r/Makefile
  config.status: creating rdft/simd/Makefile
  config.status: creating rdft/simd/common/Makefile
  config.status: creating rdft/simd/sse2/Makefile
  config.status: creating rdft/simd/avx/Makefile
  config.status: creating rdft/simd/avx-128-fma/Makefile
  config.status: creating rdft/simd/avx2/Makefile
  config.status: creating rdft/simd/avx2-128/Makefile
  config.status: creating rdft/simd/avx512/Makefile
  config.status: creating rdft/simd/kcvi/Makefile
  config.status: creating rdft/simd/altivec/Makefile
  config.status: creating rdft/simd/vsx/Makefile
  config.status: creating rdft/simd/neon/Makefile
  config.status: creating rdft/simd/generic-simd128/Makefile
  config.status: creating rdft/simd/generic-simd256/Makefile
  config.status: creating reodft/Makefile
  config.status: creating threads/Makefile
  config.status: creating api/Makefile
  config.status: creating mpi/Makefile
  config.status: creating libbench2/Makefile
  config.status: creating tests/Makefile
  config.status: creating doc/Makefile
  config.status: creating doc/FAQ/Makefile
  config.status: creating tools/Makefile
  config.status: creating tools/fftw_wisdom.1
  config.status: creating tools/fftw-wisdom-to-conf
  config.status: creating m4/Makefile
  config.status: creating fftw.pc
  config.status: creating config.h
  config.status: executing depfiles commands
  config.status: executing libtool commands
  === configuring in region-4.11 (/tmp/pip-install-8mjk58k8/sherpa/extern/region-4.11)
  configure: running /bin/sh ./configure --disable-option-checking '--prefix=/tmp/pip-install-8mjk58k8/sherpa/build'  '--with-pic' '--enable-standalone' '--disable-maintainer-mode' '--enable-stuberrorlib' '--disable-shared' '--enable-shared=libgrp,stklib' '--enable-fftw' '--enable-region' '--enable-group' '--enable-stk' '--enable-wcs' --cache-file=/dev/null --srcdir=.
  checking for a BSD-compatible install... /usr/bin/install -c
  checking whether build environment is sane... yes
  checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
  checking for gawk... gawk
  checking whether make sets $(MAKE)... yes
  checking whether make supports nested variables... yes
  checking whether to enable maintainer-specific portions of Makefiles... no
  checking for gcc... gcc
  checking whether the C compiler works... yes
  checking for C compiler default output file name... a.out
  checking for suffix of executables...
  checking whether we are cross compiling... no
  checking for suffix of object files... o
  checking whether we are using the GNU C compiler... yes
  checking whether gcc accepts -g... yes
  checking for gcc option to accept ISO C89... none needed
  checking whether gcc understands -c and -o together... yes
  checking whether make supports the include directive... yes (GNU style)
  checking dependency style of gcc... gcc3
  checking for bison... no
  checking for byacc... no
  checking for yacc... no
  configure: error: bison/byacc/yacc not found.
            Please install bison
  configure: error: ./configure failed for region-4.11
  ----------------------------------------
  ERROR: Failed building wheel for sherpa
  Running setup.py clean for sherpa
Failed to build sherpa
Installing collected packages: sherpa
    Running setup.py install for sherpa ... error
    ERROR: Command errored out with exit status 1:
     command: /home/kulik/Programs/anaconda3/envs/sherpa_test/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8mjk58k8/sherpa/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8mjk58k8/sherpa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-th1eo_tv/install-record.txt --single-version-externally-managed --compile --install-headers /home/kulik/Programs/anaconda3/envs/sherpa_test/include/python3.6m/sherpa
         cwd: /tmp/pip-install-8mjk58k8/sherpa/
    Complete output (374 lines):
    running sherpa_config
    warning: sherpa_config: built configure string['./configure', '--prefix=/tmp/pip-install-8mjk58k8/sherpa/build', '--with-pic', '--enable-standalone', '--disable-maintainer-mode', '--enable-stuberrorlib', '--disable-shared', '--enable-shared=libgrp,stklib', '--enable-fftw', '--enable-region', '--enable-group', '--enable-stk', '--enable-wcs']
    
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    checking how to print strings... printf
    checking whether make supports the include directive... yes (GNU style)
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc understands -c and -o together... yes
    checking dependency style of gcc... gcc3
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking whether ln -s works... yes
    checking the maximum length of command line arguments... 1572864
    checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... no
    checking how to associate runtime and link libraries... printf %s\n
    checking for ar... ar
    checking for archiver @FILE support... @
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for sysroot... no
    checking for a working dd... /usr/bin/dd
    checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
    checking for mt... no
    checking if : is a manifest tool... no
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... no
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... no
    checking whether to build static libraries... yes
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: executing depfiles commands
    config.status: executing libtool commands
    === configuring in fftw-3.3.8 (/tmp/pip-install-8mjk58k8/sherpa/extern/fftw-3.3.8)
    configure: running /bin/sh ./configure --disable-option-checking '--prefix=/tmp/pip-install-8mjk58k8/sherpa/build'  '--with-pic' '--enable-standalone' '--disable-maintainer-mode' '--enable-stuberrorlib' '--disable-shared' '--enable-shared=libgrp,stklib' '--enable-fftw' '--enable-region' '--enable-group' '--enable-stk' '--enable-wcs' --cache-file=/dev/null --srcdir=.
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking build system type... x86_64-pc-linux-gnu
    checking host system type... x86_64-pc-linux-gnu
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc understands -c and -o together... yes
    checking for style of include used by make... GNU
    checking dependency style of gcc... gcc3
    checking for C compiler vendor... gnu
    checking for gcc option to accept ISO C99... none needed
    checking for gcc option to accept ISO Standard C... (cached) none needed
    checking whether ln -s works... yes
    checking whether make sets $(MAKE)... (cached) yes
    checking how to print strings... printf
    checking for a sed that does not truncate output... /usr/bin/sed
    checking for grep that handles long lines and -e... /usr/bin/grep
    checking for egrep... /usr/bin/grep -E
    checking for fgrep... /usr/bin/grep -F
    checking for ld used by gcc... /usr/bin/ld
    checking if the linker (/usr/bin/ld) is GNU ld... yes
    checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
    checking the name lister (/usr/bin/nm -B) interface... BSD nm
    checking the maximum length of command line arguments... 1572864
    checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
    checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
    checking for /usr/bin/ld option to reload object files... -r
    checking for objdump... objdump
    checking how to recognize dependent libraries... pass_all
    checking for dlltool... dlltool
    checking how to associate runtime and link libraries... printf %s\n
    checking for ar... ar
    checking for archiver @FILE support... @
    checking for strip... strip
    checking for ranlib... ranlib
    checking command to parse /usr/bin/nm -B output from gcc object... ok
    checking for sysroot... no
    checking for a working dd... /usr/bin/dd
    checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
    checking for mt... no
    checking if : is a manifest tool... no
    checking how to run the C preprocessor... gcc -E
    checking for ANSI C header files... yes
    checking for sys/types.h... yes
    checking for sys/stat.h... yes
    checking for stdlib.h... yes
    checking for string.h... yes
    checking for memory.h... yes
    checking for strings.h... yes
    checking for inttypes.h... yes
    checking for stdint.h... yes
    checking for unistd.h... yes
    checking for dlfcn.h... yes
    checking for objdir... .libs
    checking if gcc supports -fno-rtti -fno-exceptions... no
    checking for gcc option to produce PIC... -fPIC -DPIC
    checking if gcc PIC flag -fPIC -DPIC works... yes
    checking if gcc static flag -static works... no
    checking if gcc supports -c -o file.o... yes
    checking if gcc supports -c -o file.o... (cached) yes
    checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking dynamic linker characteristics... GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking whether stripping libraries is possible... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... no
    checking whether to build static libraries... yes
    checking for ranlib... (cached) ranlib
    checking for ocamlbuild... no
    checking whether C compiler accepts -mtune=native... yes
    checking whether C compiler accepts -malign-double... yes
    checking whether C compiler accepts -fstrict-aliasing... yes
    checking whether C compiler accepts -fno-schedule-insns... yes
    checking whether C compiler accepts -O3 -fomit-frame-pointer -mtune=native -malign-double -fstrict-aliasing -fno-schedule-insns... yes
    checking for ANSI C header files... (cached) yes
    checking fcntl.h usability... yes
    checking fcntl.h presence... yes
    checking for fcntl.h... yes
    checking fenv.h usability... yes
    checking fenv.h presence... yes
    checking for fenv.h... yes
    checking limits.h usability... yes
    checking limits.h presence... yes
    checking for limits.h... yes
    checking malloc.h usability... yes
    checking malloc.h presence... yes
    checking for malloc.h... yes
    checking stddef.h usability... yes
    checking stddef.h presence... yes
    checking for stddef.h... yes
    checking sys/time.h usability... yes
    checking sys/time.h presence... yes
    checking for sys/time.h... yes
    checking altivec.h usability... no
    checking altivec.h presence... no
    checking for altivec.h... no
    checking for an ANSI C-conforming const... yes
    checking for inline... inline
    checking for size_t... yes
    checking for uint32_t... yes
    checking for uint64_t... yes
    checking whether time.h and sys/time.h may both be included... yes
    checking for long double... yes
    checking for hrtime_t... no
    checking size of int... 4
    checking size of unsigned int... 4
    checking size of long... 8
    checking size of unsigned long... 8
    checking size of long long... 8
    checking size of unsigned long long... 8
    checking size of size_t... 8
    checking size of ptrdiff_t... 8
    checking for ptrdiff_t... yes
    checking for uintptr_t... yes
    checking size of float... 4
    checking size of double... 8
    checking size of fftw_r2r_kind... 4
    checking for working alloca.h... yes
    checking for alloca... yes
    checking for working strtod... yes
    checking for vprintf... yes
    checking for _doprnt... no
    checking for sin in -lm... yes
    checking for BSDgettimeofday... no
    checking for gettimeofday... yes
    checking for gethrtime... no
    checking for read_real_time... no
    checking for time_base_to_time... no
    checking for drand48... yes
    checking for sqrt... yes
    checking for memset... yes
    checking for posix_memalign... yes
    checking for memalign... yes
    checking for _mm_malloc... no
    checking for _mm_free... no
    checking for clock_gettime... yes
    checking for mach_absolute_time... no
    checking for sysctl... yes
    checking for abort... yes
    checking for sinl... yes
    checking for cosl... yes
    checking for snprintf... yes
    checking for memmove... yes
    checking for strchr... yes
    checking for getpagesize... yes
    checking whether sinl is declared... yes
    checking whether cosl is declared... yes
    checking whether sinq is declared... no
    checking whether cosq is declared... no
    checking whether memalign is declared... yes
    checking whether drand48 is declared... yes
    checking whether srand48 is declared... yes
    checking whether posix_memalign is declared... yes
    checking for _rtc intrinsic... no
    checking for isnan... yes
    checking whether C compiler accepts -mpreferred-stack-boundary=4... yes
    checking whether the stack is at least 8-byte aligned by gcc... checking whether C compiler accepts -malign-double... (cached) yes
    yes
    checking for g77... no
    checking for xlf... no
    checking for f77... no
    checking for frt... no
    checking for pgf77... no
    checking for cf77... no
    checking for fort77... no
    checking for fl32... no
    checking for af77... no
    checking for xlf90... no
    checking for f90... no
    checking for pgf90... no
    checking for pghpf... no
    checking for epcf90... no
    checking for gfortran... gfortran
    checking whether we are using the GNU Fortran 77 compiler... yes
    checking whether gfortran accepts -g... yes
    checking if libtool supports shared libraries... yes
    checking whether to build shared libraries... no
    checking whether to build static libraries... yes
    checking for gfortran option to produce PIC... -fPIC
    checking if gfortran PIC flag -fPIC works... yes
    checking if gfortran static flag -static works... no
    checking if gfortran supports -c -o file.o... yes
    checking if gfortran supports -c -o file.o... (cached) yes
    checking whether the gfortran linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
    checking dynamic linker characteristics... (cached) GNU/Linux ld.so
    checking how to hardcode library paths into programs... immediate
    checking how to get verbose linking output from gfortran... -v
    checking for Fortran 77 libraries of gfortran...  -L/usr/lib/gcc/x86_64-redhat-linux/9 -L/usr/lib/gcc/x86_64-redhat-linux/9/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/9/../../.. -lgfortran -lm -lquadmath
    checking for dummy main to link with Fortran 77 libraries... none
    checking for Fortran 77 name-mangling scheme... lower case, underscore, no extra underscore
    checking whether a cycle counter is available... yes
    checking that generated files are newer than configure... done
    configure: creating ./config.status
    config.status: creating Makefile
    config.status: creating support/Makefile
    config.status: creating genfft/Makefile
    config.status: creating kernel/Makefile
    config.status: creating simd-support/Makefile
    config.status: creating dft/Makefile
    config.status: creating dft/scalar/Makefile
    config.status: creating dft/scalar/codelets/Makefile
    config.status: creating dft/simd/Makefile
    config.status: creating dft/simd/common/Makefile
    config.status: creating dft/simd/sse2/Makefile
    config.status: creating dft/simd/avx/Makefile
    config.status: creating dft/simd/avx-128-fma/Makefile
    config.status: creating dft/simd/avx2/Makefile
    config.status: creating dft/simd/avx2-128/Makefile
    config.status: creating dft/simd/avx512/Makefile
    config.status: creating dft/simd/kcvi/Makefile
    config.status: creating dft/simd/altivec/Makefile
    config.status: creating dft/simd/vsx/Makefile
    config.status: creating dft/simd/neon/Makefile
    config.status: creating dft/simd/generic-simd128/Makefile
    config.status: creating dft/simd/generic-simd256/Makefile
    config.status: creating rdft/Makefile
    config.status: creating rdft/scalar/Makefile
    config.status: creating rdft/scalar/r2cf/Makefile
    config.status: creating rdft/scalar/r2cb/Makefile
    config.status: creating rdft/scalar/r2r/Makefile
    config.status: creating rdft/simd/Makefile
    config.status: creating rdft/simd/common/Makefile
    config.status: creating rdft/simd/sse2/Makefile
    config.status: creating rdft/simd/avx/Makefile
    config.status: creating rdft/simd/avx-128-fma/Makefile
    config.status: creating rdft/simd/avx2/Makefile
    config.status: creating rdft/simd/avx2-128/Makefile
    config.status: creating rdft/simd/avx512/Makefile
    config.status: creating rdft/simd/kcvi/Makefile
    config.status: creating rdft/simd/altivec/Makefile
    config.status: creating rdft/simd/vsx/Makefile
    config.status: creating rdft/simd/neon/Makefile
    config.status: creating rdft/simd/generic-simd128/Makefile
    config.status: creating rdft/simd/generic-simd256/Makefile
    config.status: creating reodft/Makefile
    config.status: creating threads/Makefile
    config.status: creating api/Makefile
    config.status: creating mpi/Makefile
    config.status: creating libbench2/Makefile
    config.status: creating tests/Makefile
    config.status: creating doc/Makefile
    config.status: creating doc/FAQ/Makefile
    config.status: creating tools/Makefile
    config.status: creating tools/fftw_wisdom.1
    config.status: creating tools/fftw-wisdom-to-conf
    config.status: creating m4/Makefile
    config.status: creating fftw.pc
    config.status: creating config.h
    config.status: executing depfiles commands
    config.status: executing libtool commands
    === configuring in region-4.11 (/tmp/pip-install-8mjk58k8/sherpa/extern/region-4.11)
    configure: running /bin/sh ./configure --disable-option-checking '--prefix=/tmp/pip-install-8mjk58k8/sherpa/build'  '--with-pic' '--enable-standalone' '--disable-maintainer-mode' '--enable-stuberrorlib' '--disable-shared' '--enable-shared=libgrp,stklib' '--enable-fftw' '--enable-region' '--enable-group' '--enable-stk' '--enable-wcs' --cache-file=/dev/null --srcdir=.
    checking for a BSD-compatible install... /usr/bin/install -c
    checking whether build environment is sane... yes
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
    checking for gawk... gawk
    checking whether make sets $(MAKE)... yes
    checking whether make supports nested variables... yes
    checking whether to enable maintainer-specific portions of Makefiles... no
    checking for gcc... gcc
    checking whether the C compiler works... yes
    checking for C compiler default output file name... a.out
    checking for suffix of executables...
    checking whether we are cross compiling... no
    checking for suffix of object files... o
    checking whether we are using the GNU C compiler... yes
    checking whether gcc accepts -g... yes
    checking for gcc option to accept ISO C89... none needed
    checking whether gcc understands -c and -o together... yes
    checking whether make supports the include directive... yes (GNU style)
    checking dependency style of gcc... gcc3
    checking for bison... no
    checking for byacc... no
    checking for yacc... no
    configure: error: bison/byacc/yacc not found.
              Please install bison
    configure: error: ./configure failed for region-4.11
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/kulik/Programs/anaconda3/envs/sherpa_test/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-8mjk58k8/sherpa/setup.py'"'"'; __file__='"'"'/tmp/pip-install-8mjk58k8/sherpa/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-th1eo_tv/install-record.txt --single-version-externally-managed --compile --install-headers /home/kulik/Programs/anaconda3/envs/sherpa_test/include/python3.6m/sherpa Check the logs for full command output.
(sherpa_test) [kulik@redwood ~]$ pip freeze
certifi==2020.4.5.2
numpy==1.18.5
pymultinest==2.9
(sherpa_test) [kulik@redwood ~]$ conda install -n sherpa_test -c sherpa sherpa
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: /home/kulik/Programs/anaconda3/envs/sherpa_test

  added / updated specs:
    - sherpa


The following NEW packages will be INSTALLED:

  attrs              pkgs/main/noarch::attrs-19.3.0-py_0
  blas               pkgs/main/linux-64::blas-1.0-mkl
  importlib-metadata pkgs/main/linux-64::importlib-metadata-1.6.0-py36_0
  importlib_metadata pkgs/main/noarch::importlib_metadata-1.6.0-0
  intel-openmp       pkgs/main/linux-64::intel-openmp-2020.1-217
  libgfortran-ng     pkgs/main/linux-64::libgfortran-ng-7.3.0-hdf63c60_0
  mkl                pkgs/main/linux-64::mkl-2020.1-217
  mkl-service        pkgs/main/linux-64::mkl-service-2.3.0-py36he904b0f_0
  mkl_fft            pkgs/main/linux-64::mkl_fft-1.0.15-py36ha843d7b_0
  mkl_random         pkgs/main/linux-64::mkl_random-1.1.1-py36h0573a6f_0
  more-itertools     pkgs/main/noarch::more-itertools-8.3.0-py_0
  numpy              pkgs/main/linux-64::numpy-1.18.1-py36h4f9e942_0
  numpy-base         pkgs/main/linux-64::numpy-base-1.18.1-py36hde5b4d6_1
  packaging          pkgs/main/noarch::packaging-20.3-py_0
  pluggy             pkgs/main/linux-64::pluggy-0.13.1-py36_0
  py                 pkgs/main/noarch::py-1.8.1-py_0
  pyparsing          pkgs/main/noarch::pyparsing-2.4.7-py_0
  pytest             pkgs/main/linux-64::pytest-5.4.2-py36_0
  sherpa             sherpa/linux-64::sherpa-4.12.0-py36hf484d3e_0
  six                pkgs/main/noarch::six-1.15.0-py_0
  wcwidth            pkgs/main/noarch::wcwidth-0.1.9-py_0
  zipp               pkgs/main/noarch::zipp-3.1.0-py_0


Proceed ([y]/n)? y

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(sherpa_test) [kulik@redwood ~]$ pip freeze
attrs==19.3.0
certifi==2020.4.5.2
importlib-metadata==1.6.0
mkl-fft==1.0.15
mkl-random==1.1.1
mkl-service==2.3.0
more-itertools==8.3.0
numpy==1.18.5
packaging==20.3
pluggy==0.13.1
py==1.8.1
pymultinest==2.9
pyparsing==2.4.7
pytest==5.4.2
sherpa==4.12.0
six==1.15.0
wcwidth==0.1.9
zipp==3.1.0
(sherpa_test) [kulik@redwood ~]$
@hamogu
Copy link
Contributor

hamogu commented Jun 16, 2020

Yes, the current sherpa install scripts require numpy to be available in the environment already. That's because the setup.py uses setup from numpy.disutils, thus numpy needs to be installed when the setup is run.

We are working on changes to the package that will solve this in the future (#782, #784), but for now you simply have to install numpy in some way before you install sherpa (e.g. pip install numpy before you call pip install sherpa).

@klaykulik
Copy link
Author

Thanks for the reply.

Pip still does not install sherpa after numpy is installed. In the initial issue, I tried to pip install sherpa. It asked for numpy, which I installed (see the pip freeze output). Even after this, pip install sherpa still errors out and says please install bison.

There is nothing mentioned in the installation instructions about installing bison. I don't see why pip requires bison to install sherpa, but conda can install it easily.

@hamogu
Copy link
Contributor

hamogu commented Jun 16, 2020

Bison is needed for a source install and I think that's happening here with pip (There are no binary wheels for sherpa on pypi ). You can see all the output from the ./configure script in the terminal output you pasted.
On the other hand, conda just downloads the compiled sherpa and the dependencies, so the conda version does not care if a compiler or tools like bison are available on the system.

Thanks you for reporting; it's not always easy to know how users actually use sherpa "in the wild". May I ask if this is something you just came across by chance or is it important for you to be able to install sherpa from with pip (instead of conda)?

@hamogu
Copy link
Contributor

hamogu commented Jun 16, 2020

Sorry, I should have added that bison is not a Python package, it's part of the usual system compiler tools together with the gcc compiler etc.

@klaykulik
Copy link
Author

Okay that makes sense, thanks!

I had planned on using sherpa as a requirement in a package I'm working on, and found the issue when trying to pip install the package's requirements in a new env. I must have used conda to install it while developing, and just noticed the issue now while testing the install of my package.

@DougBurke
Copy link
Contributor

The pip-installation section at https://sherpa.readthedocs.io/en/latest/install.html#using-pip should be updated (probably to say "please follow the source-installation" instructions).

@hamogu
Copy link
Contributor

hamogu commented Jun 16, 2020

@klaykulik : How much of a problem is the current behaviour for you, or in other words, how hard should we work to fix this? (Just trying to a a vote from you as a "user" to help guide if we should focus our work in installation, or new features, or improved plotting etc...

@klaykulik
Copy link
Author

It's not a big deal, I can work around it. I just wanted to make sure you were aware of the issue.

Thanks again!

@DougBurke
Copy link
Contributor

We have just merged #782 into master which means pip will now install numpy along with sherpa. This doesn't help if you do not have a compiler or one of the other tools needed to build Sherpa. I don't know at what point support in the tooling for identifying requirements (e.g. for bison or an equivalent) stops and it becomes a documentation issue.

@ThaisGuerini
Copy link

Hello,
I am still having trouble to install sherpa by using pip. I am trying to use it in Google Colab, I don't know if this might be the problem or if I should install something else.

@DougBurke
Copy link
Contributor

@ThaisGuerini - is there any information on why it failed?

@ThaisGuerini
Copy link

ThaisGuerini commented Oct 28, 2020 via email

@DougBurke
Copy link
Contributor

Well, that's not particularly helpful!

My guess is that you are missing one of the compilation tools we need (possibly flex or bison but you also need gcc, g++, and make). There's a note about it at https://sherpa.readthedocs.io/en/latest/install.html#building-from-source but it's not obvious how to tell python these non-python requirements (unless it's in PEP 517 or related and we just don't take advantage of it).

@DougBurke
Copy link
Contributor

You could try

% mkdir temp
% cd temp
% pip download sherpa
% tar xzf sherpa-4.12.2.tar.gz
% cd sherpa-4.12.2
% python setup.py install

and see if that gives useful information. Or use the --log option to pip install but I think that is very verbose and hard to parse (at least when I've tried)

@ThaisGuerini
Copy link

Sorry to bother you again.
I tried what you suggested, but I couldn't understand what went wrong. I don't know if you find it helpful, but the error message was:
UsageError: Line magic function %tar not found.

@DougBurke
Copy link
Contributor

Are you running this from within an ipython or jupyter notebook? If so, is this a local environment or something like Google's colab?

@ThaisGuerini
Copy link

I am running it from the Google's Colab website.

@DougBurke
Copy link
Contributor

What you would have needed to do was run the commands with each line starting with a ! as they are shell commands, not python.

Unfortunately, the colab system doesn't contain the necessary tools to build Sherpa - you would see an error like the following if you had unpacked the directory

!python setup.py install
...
... quite a lot of screen output
...
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of gcc... gcc3
checking for bison... no
checking for byacc... no
checking for yacc... no
configure: error: bison/byacc/yacc not found.
          Please install bison
configure: error: ./configure failed for region-4.11

I don't have experience with colab to know if there's ways to install software or to add the conda package manager.

@DougBurke
Copy link
Contributor

@hamogu - I believe you have 'Google colab' knowledge that may be useful here.

@hamogu
Copy link
Contributor

hamogu commented Oct 29, 2020

Try this in colab to get conda:

!wget https://repo.continuum.io/miniconda/Miniconda3-4.5.4-Linux-x86_64.sh && bash Miniconda3-4.5.4-Linux-x86_64.sh -bfp /usr/local

Then, install whatever conda packages you want with conda:

!conda install -y -q sherpa

Because you can't activate the conda environment from within colab, you have to manually add the path. I use the following, you might get away with not adding all of them, that depends on what other packages are installed, but there is no harm in listing too many packages, so I'll just give you what I use:

%env PATH /usr/local/pkgs/cfitsio-3.470-h14c3975_0/lib/:/usr/local/nvidia/bin:/usr/local/cuda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/tools/node/bin:/tools/google-cloud-sdk/bin:/opt/bin
%env LD_LIBRARY_PATH /usr/local/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64

Note however, that this is not an officially support way of using Sherpa. We're happy to hear feedback from you and will try to help, but we many not have solutions to all problems you could encounter.

@hamogu
Copy link
Contributor

hamogu commented Oct 29, 2020

I forgot, in colab, always install python=3.6 in conda calls, so that all packages match the python version that colab runs on:

!conda install -y -q  python=3.6 sherpa

@ThaisGuerini
Copy link

@hamogu I tried what you suggested, but, unfortunately, I got an error message telling me the package isn't available.
I am going to try to do what I need using other packages. Thank you anyway.

@hamogu
Copy link
Contributor

hamogu commented Nov 2, 2020

I don't know what's different for you - but here is an example that works for me:
https://colab.research.google.com/drive/1IkqH2fy9ESBBFt7fHLunRAQVTbaMDzMk?usp=sharing
Note that in this example I'm not just installing sherpa, but all of the Chandra software: CIAO, etc.

You have not told us much about your use case, so it's hard to give advice beyond of exact question "How do I install ...?". However, let me just say that Sherpa is of course made for a specific use case (fitting of X-ray data) where I think it's capabilities are almost unique in the Python world. On the other hand, Sherpa is also good for other things (fitting other spectra or any data really). In that capacity, Sherpa is not unique. There are certainly other packages to do that and if that's what you are looking for, then I would not necessarily bother with Sherpa if the installation is a headache for you.

Since you indicated that you are going to try other packages, I'm going to close this issue, but feel free to re-open if you have any follow-up questions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants