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 clawpack doesn't work #172

Open
LukaszPawlowski opened this issue Dec 27, 2019 · 3 comments
Open

pip install clawpack doesn't work #172

LukaszPawlowski opened this issue Dec 27, 2019 · 3 comments

Comments

@LukaszPawlowski
Copy link

LukaszPawlowski commented Dec 27, 2019

I've not been able to get geoclaw to successfully install and run examples. Here's what the install does. How can I fix it?

(environment_geo3.yml) homeuser@CORSAIRONE:~$ pip install clawpack
Collecting clawpack
  Downloading https://files.pythonhosted.org/packages/80/e1/c2c354b237b457e40afb1597a5efa080ba82cfc911f3145f06a4909d49e7/clawpack-5.6.1.tar.gz (5.7MB)
     |████████████████████████████████| 5.7MB 3.4MB/s
Requirement already satisfied: numpy>=1.14 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from clawpack) (1.17.4)
Requirement already satisfied: matplotlib>=1.0.1 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from clawpack) (3.1.1)
Requirement already satisfied: cycler>=0.10 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from matplotlib>=1.0.1->clawpack) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from matplotlib>=1.0.1->clawpack) (1.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from matplotlib>=1.0.1->clawpack) (2.4.5)
Requirement already satisfied: python-dateutil>=2.1 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from matplotlib>=1.0.1->clawpack) (2.8.1)
Requirement already satisfied: six in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from cycler>=0.10->matplotlib>=1.0.1->clawpack) (1.13.0)
Requirement already satisfied: setuptools in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib>=1.0.1->clawpack) (42.0.2.post20191203)
Building wheels for collected packages: clawpack
  Building wheel for clawpack (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/homeuser/anaconda3/envs/environment_geo3.yml/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0_85c96o/clawpack/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0_85c96o/clawpack/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-lc3mgo7l --python-tag cp36
       cwd: /tmp/pip-install-0_85c96o/clawpack/
  Complete output (35 lines):
  analyzeline: intent(callback) rpn2 is already in argument listanalyzeline: intent(callback) rpt2 is already in argument listanalyzeline: intent(callback) rpn3 is already in argument listanalyzeline: intent(callback) rpt3 is already in argument listanalyzeline: intent(callback) rptt3 is already in argument listanalyzeline: intent(callback) rpn2 is already in argument listanalyzeline: intent(callback) rpt2 is already in argument list/home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/distutils/fcompiler/__init__.py:517: UserWarning: FFLAGS is used as is, not appended to flags already defined by numpy.distutils! Use NPY_DISTUTILS_APPEND_FLAGS=1 to obtain appending behavior instead (this behavior will become default in a future release).
    fflags = self.flag_vars.flags + dflags + oflags + aflags
  In file included from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:0,
                   from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/fortranobject.h:13,
                   from build/src.linux-x86_64-3.6/clawpack/riemann/acoustics_1D_ptwisemodule.c:16:
  /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it with " \
    ^~~~~~~
  In file included from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:0,
                   from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                   from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                   from build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/fortranobject.h:13,
                   from build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/fortranobject.c:2:
  /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
   #warning "Using deprecated NumPy API, disable it with " \
    ^~~~~~~
  build/src.linux-x86_64-3.6/clawpack/riemann/acoustics_1D_ptwisemodule.c:109:12: warning: ‘f2py_size’ defined but not used [-Wunused-function]
   static int f2py_size(PyArrayObject* var, ...)
              ^~~~~~~~~
  riemann/src/rp1_acoustics_ptwise.f90:5:66:

   subroutine rp1_ptwise(num_eqn, num_aux, num_waves, q_l, q_r, aux_l, aux_r,    &
                                                                    1
  Warning: Unused dummy argument ‘aux_l’ at (1) [-Wunused-dummy-argument]
  riemann/src/rp1_acoustics_ptwise.f90:5:73:

   subroutine rp1_ptwise(num_eqn, num_aux, num_waves, q_l, q_r, aux_l, aux_r,    &
                                                                           1
  Warning: Unused dummy argument ‘aux_r’ at (1) [-Wunused-dummy-argument]
  /usr/bin/ld: build/temp.linux-x86_64-3.6/riemann/src/rp1_acoustics_ptwise.o: relocation R_X86_64_PC32 against symbol `cparam_' can not be used when making a shared object; recompile with -fPIC
  /usr/bin/ld: final link failed: Bad value
  collect2: error: ld returned 1 exit status
  error: Command "/usr/bin/gfortran -Wall -g -Wall -g -shared build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/acoustics_1D_ptwisemodule.o build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/fortranobject.o build/temp.linux-x86_64-3.6/riemann/src/rp1_ptwise.o build/temp.linux-x86_64-3.6/riemann/src/rp1_acoustics_ptwise.o build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/acoustics_1D_ptwise-f2pywrappers.o -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/7 -lgfortran -o build/lib.linux-x86_64-3.6/clawpack/riemann/acoustics_1D_ptwise.cpython-36m-x86_64-linux-gnu.so" failed with exit status 1
  ----------------------------------------
  ERROR: Failed building wheel for clawpack
  Running setup.py clean for clawpack
Failed to build clawpack
Installing collected packages: clawpack
    Running setup.py install for clawpack ... error
    ERROR: Command errored out with exit status 1:
     command: /home/homeuser/anaconda3/envs/environment_geo3.yml/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0_85c96o/clawpack/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0_85c96o/clawpack/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-0ugyv7l3/install-record.txt --single-version-externally-managed --compile
         cwd: /tmp/pip-install-0_85c96o/clawpack/
    Complete output (35 lines):
    /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/distutils/fcompiler/__init__.py:517: UserWarning: FFLAGS is used as is, not appended to flags already defined by numpy.distutils! Use NPY_DISTUTILS_APPEND_FLAGS=1 to obtain appending behavior instead (this behavior will become default in a future release).
      fflags = self.flag_vars.flags + dflags + oflags + aflags
    In file included from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:0,
                     from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/fortranobject.h:13,
                     from build/src.linux-x86_64-3.6/clawpack/riemann/acoustics_1D_ptwisemodule.c:16:
    /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it with " \
      ^~~~~~~
    In file included from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/ndarraytypes.h:1832:0,
                     from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/ndarrayobject.h:12,
                     from /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/arrayobject.h:4,
                     from build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/fortranobject.h:13,
                     from build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/fortranobject.c:2:
    /home/homeuser/anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages/numpy/core/include/numpy/npy_1_7_deprecated_api.h:17:2: warning: #warning "Using deprecated NumPy API, disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]
     #warning "Using deprecated NumPy API, disable it with " \
      ^~~~~~~
    build/src.linux-x86_64-3.6/clawpack/riemann/acoustics_1D_ptwisemodule.c:109:12: warning: ‘f2py_size’ defined but not used [-Wunused-function]
     static int f2py_size(PyArrayObject* var, ...)
                ^~~~~~~~~
    riemann/src/rp1_acoustics_ptwise.f90:5:66:

     subroutine rp1_ptwise(num_eqn, num_aux, num_waves, q_l, q_r, aux_l, aux_r,    &
                                                                      1
    Warning: Unused dummy argument ‘aux_l’ at (1) [-Wunused-dummy-argument]
    riemann/src/rp1_acoustics_ptwise.f90:5:73:

     subroutine rp1_ptwise(num_eqn, num_aux, num_waves, q_l, q_r, aux_l, aux_r,    &
                                                                             1
    Warning: Unused dummy argument ‘aux_r’ at (1) [-Wunused-dummy-argument]
    /usr/bin/ld: build/temp.linux-x86_64-3.6/riemann/src/rp1_acoustics_ptwise.o: relocation R_X86_64_PC32 against symbol `cparam_' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: final link failed: Bad value
    collect2: error: ld returned 1 exit status
    error: Command "/usr/bin/gfortran -Wall -g -Wall -g -shared build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/acoustics_1D_ptwisemodule.o build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/fortranobject.o build/temp.linux-x86_64-3.6/riemann/src/rp1_ptwise.o build/temp.linux-x86_64-3.6/riemann/src/rp1_acoustics_ptwise.o build/temp.linux-x86_64-3.6/build/src.linux-x86_64-3.6/clawpack/riemann/acoustics_1D_ptwise-f2pywrappers.o -L/usr/lib/gcc/x86_64-linux-gnu/7 -L/usr/lib/gcc/x86_64-linux-gnu/7 -lgfortran -o build/lib.linux-x86_64-3.6/clawpack/riemann/acoustics_1D_ptwise.cpython-36m-x86_64-linux-gnu.so" failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/homeuser/anaconda3/envs/environment_geo3.yml/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-0_85c96o/clawpack/setup.py'"'"'; __file__='"'"'/tmp/pip-install-0_85c96o/clawpack/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-0ugyv7l3/install-record.txt --single-version-externally-managed --compile Check the logs for full command output.
@ketch
Copy link
Member

ketch commented Dec 27, 2019

As explained at http://www.clawpack.org/installing.html, you won't be able to use Geoclaw if you install using that method. You'll want to use the full install command given there.

As for what is causing the error above, I don't know, and it's likely that you'll still run into this error when using the appropriate install command. Based on some quick googling, the solution may be to recompile boost on your system with the indicated flag, but I'm not very adept with this kind of thing.

@LukaszPawlowski
Copy link
Author

I think you mean this one:
pip install --src=$HOME/clawpack_src --user -e
git+https://github.com/clawpack/clawpack.git@v5.6.1#egg=clawpack-v5.6.1

That doesn't work either as follows:

(environment_geo3.yml) homeuser@CORSAIRONE:~$ pip install --src=$HOME/clawpack_src --user -e \
>     git+https://github.com/clawpack/clawpack.git@v5.6.1#egg=clawpack-v5.6.1
Obtaining clawpack-v5.6.1 from git+https://github.com/clawpack/clawpack.git@v5.6.1#egg=clawpack-v5.6.1
  Updating ./clawpack_src/clawpack-v5.6.1 clone (to revision v5.6.1)
  Running command git fetch -q --tags
  Running command git reset --hard -q 08335f6585f0a8142728665b216fcab2c3867860
  Running command git submodule update --init --recursive -q
  WARNING: Generating metadata for package clawpack-v5.6.1 produced metadata for project name clawpack. Fix your #egg=clawpack-v5.6.1 fragments.
Requirement already satisfied: numpy>=1.14 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from clawpack) (1.17.4)
Requirement already satisfied: matplotlib>=1.0.1 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from clawpack) (3.1.1)
Requirement already satisfied: cycler>=0.10 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from matplotlib>=1.0.1->clawpack) (0.10.0)
Requirement already satisfied: kiwisolver>=1.0.1 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from matplotlib>=1.0.1->clawpack) (1.1.0)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from matplotlib>=1.0.1->clawpack) (2.4.5)
Requirement already satisfied: python-dateutil>=2.1 in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from matplotlib>=1.0.1->clawpack) (2.8.1)
Requirement already satisfied: six in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from cycler>=0.10->matplotlib>=1.0.1->clawpack) (1.13.0)
Requirement already satisfied: setuptools in ./anaconda3/envs/environment_geo3.yml/lib/python3.6/site-packages (from kiwisolver>=1.0.1->matplotlib>=1.0.1->clawpack) (42.0.2.post20191203)
Installing collected packages: clawpack
  Running setup.py develop for clawpack
    ERROR: Command errored out with exit status 1:
     command: /home/homeuser/anaconda3/envs/environment_geo3.yml/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/homeuser/clawpack_src/clawpack-v5.6.1/setup.py'"'"'; __file__='"'"'/home/homeuser/clawpack_src/clawpack-v5.6.1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix=
         cwd: /home/homeuser/clawpack_src/clawpack-v5.6.1/
    Complete output (1 lines):
    error: [Errno 13] Permission denied: '/home/homeuser/.local/lib/python3.6'
    ----------------------------------------
ERROR: Command errored out with exit status 1: /home/homeuser/anaconda3/envs/environment_geo3.yml/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/home/homeuser/clawpack_src/clawpack-v5.6.1/setup.py'"'"'; __file__='"'"'/home/homeuser/clawpack_src/clawpack-v5.6.1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps --user --prefix= Check the logs for full command output.

My ~/.local/lib folder does not have python3.6 in it, which probably accounts for the failure. What is no clear is how to fix that, or why that's required given that I have python installed per below:

(environment_geo3.yml) homeuser@CORSAIRONE:~$ python
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

(environment_geo3.yml) homeuser@CORSAIRONE:~$ python3.6
Python 3.6.9 |Anaconda, Inc.| (default, Jul 30 2019, 19:07:31)
[GCC 7.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.

@mandli
Copy link
Member

mandli commented Dec 29, 2019

Sounds like your installation of anaconda was done using a root user or some silliness. Can you check the permissions on that director to check?

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

No branches or pull requests

3 participants