vtsuperdarn / davitpy

DEPRECATED The DaViT Python project
http://vtsuperdarn.github.com/davitpy/
GNU General Public License v3.0
37 stars 59 forks source link

Question of install error #39

Closed xnchu closed 10 years ago

xnchu commented 10 years ago

I am new here. The question is so dumb. Please help. I followed the instruction and when I try install using "sudo python setup.py install", the compile error popped out. I think I have all the dependencies. What did I do wrong? I attached all the information below. Thanks in advance!

spurces ['pydarn', 'pydarn.sdio', 'pydarn.plotting', 'pydarn.radar', 'pydarn.proc', 'pydarn.proc.music', 'pydarn.proc.signal', 'gme', 'gme.isr', 'gme.plotting', 'gme.sat', 'gme.ind', 'gme.base', 'utils', 'models', 'models.igrf', 'models.hwm', 'models.tsyganenko', 'models.iri', 'models.raydarn', 'models.msis'] options (after parsing config files): options (after parsing command line): option dict for 'aliases' command: {} option dict for 'install' command: {} running install Distribution.get_commandobj(): creating 'install' command object pre-finalize{unix,other}: prefix: None exec_prefix: None home: None user: 0 install_base: None install_platbase: None root: None install_purelib: None install_platlib: None install_lib: None install_headers: None install_scripts: None install_data: None compile: None compile: True optimize: None force: None skip_build: 0 record: None install_layout: None old_and_unmanageable: None single_version_externallymanaged: None post-finalize{unix,other}(): prefix: /usr exec_prefix: /usr home: None user: 0 install_base: /usr install_platbase: /usr root: None install_purelib: $base/local/lib/python$py_version_short/dist-packages install_platlib: $platbase/local/lib/python$py_version_short/dist-packages install_lib: None install_headers: $base/local/include/python$py_version_short/$dist_name install_scripts: $base/local/bin install_data: $base/local compile: None compile: True optimize: None force: None skip_build: 0 record: None install_layout: None old_and_unmanageable: None single_version_externally_managed: None post-expand_basedirs(): prefix: /usr exec_prefix: /usr home: None user: 0 install_base: /usr install_platbase: /usr root: None install_purelib: $base/local/lib/python$py_version_short/dist-packages install_platlib: $platbase/local/lib/python$py_version_short/dist-packages install_lib: None install_headers: $base/local/include/python$py_version_short/$dist_name install_scripts: $base/local/bin install_data: $base/local compile: None compile: True optimize: None force: None skip_build: 0 record: None install_layout: None old_and_unmanageable: None single_version_externally_managed: None config vars: {'base': '/usr', 'dist_fullname': 'davitpy-0.2', 'dist_name': 'davitpy', 'dist_version': '0.2', 'exec_prefix': '/usr', 'platbase': '/usr', 'prefix': '/usr', 'py_version': '2.7.6', 'py_version_nodot': '27', 'py_version_short': '2.7', 'sys_exec_prefix': '/usr', 'sys_prefix': '/usr', 'userbase': '/home/sean/.local', 'usersite': '/home/sean/.local/lib/python2.7/site-packages'} post-expand_dirs(): prefix: /usr exec_prefix: /usr home: None user: 0 install_base: /usr install_platbase: /usr root: None install_purelib: /usr/local/lib/python2.7/dist-packages install_platlib: /usr/local/lib/python2.7/dist-packages install_lib: None install_headers: /usr/local/include/python2.7/davitpy install_scripts: /usr/local/bin install_data: /usr/local compile: None compile: True optimize: None force: None skip_build: 0 record: None install_layout: None old_and_unmanageable: None single_version_externally_managed: None after prepending root: prefix: /usr exec_prefix: /usr home: None user: 0 install_base: /usr install_platbase: /usr root: None install_purelib: /usr/local/lib/python2.7/dist-packages install_platlib: /usr/local/lib/python2.7/dist-packages install_lib: /usr/local/lib/python2.7/dist-packages/ install_headers: /usr/local/include/python2.7/davitpy install_scripts: /usr/local/bin install_data: /usr/local compile: None compile: True optimize: None force: None skip_build: 0 record: None install_layout: None old_and_unmanageable: None single_version_externally_managed: None Distribution.get_command_obj(): creating 'build' command object setting options for 'easy_install' command: Distribution.get_command_obj(): creating 'install_lib' command object Distribution.get_command_obj(): creating 'install_scripts' command object running bdist_egg Distribution.get_command_obj(): creating 'bdist_egg' command object Distribution.get_command_obj(): creating 'egg_info' command object Distribution.get_command_obj(): creating 'bdist' command object running egg_info running build_src Distribution.get_command_obj(): creating 'build_src' command object Distribution.get_command_obj(): creating 'build_ext' command object build_src building extension "dmapio" sources building extension "aacgm" sources building extension "tsygFort" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. adding 'build/src.linux-x86_64-2.7/models/tsyganenko/tsygFort-f2pywrappers.f' to sources. building extension "hwm07" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. building extension "msisFort" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. adding 'build/src.linux-x86_64-2.7/models/msis/msisFort-f2pywrappers.f' to sources. building extension "igrf" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. building extension "iri" sources f2py options: [] adding 'build/src.linux-x86_64-2.7/fortranobject.c' to sources. adding 'build/src.linux-x86_64-2.7' to include_dirs. adding 'build/src.linux-x86_64-2.7/models/iri/iri-f2pywrappers.f' to sources. build_src: building npy-pkg config files writing davitpy.egg-info/PKG-INFO writing top-level names to davitpy.egg-info/top_level.txt writing dependency_links to davitpy.egg-info/dependency_links.txt Distribution.get_command_obj(): creating 'build_py' command object reading manifest file 'davitpy.egg-info/SOURCES.txt' includepattern: applying regex r'^davitpy.egg-info/.[^/]_\Z(?ms)' adding davitpy.egg-info/PKG-INFO adding davitpy.egg-info/not-zip-safe adding davitpy.egg-info/top_level.txt adding davitpy.egg-info/SOURCES.txt adding davitpy.egg-info/dependency_links.txt excludepattern: applying regex r'^build/.' removing build/src.linux-x86_64-2.7/fortranobject.h removing build/src.linux-x86_64-2.7/models/iri/iri-f2pywrappers.f removing build/src.linux-x86_64-2.7/fortranobject.c removing build/src.linux-x86_64-2.7/models/iri/irimodule.c removing build/src.linux-x86_64-2.7/fortranobject.h removing build/src.linux-x86_64-2.7/fortranobject.c removing build/src.linux-x86_64-2.7/models/igrf/igrfmodule.c removing build/src.linux-x86_64-2.7/fortranobject.h removing build/src.linux-x86_64-2.7/models/msis/msisFort-f2pywrappers.f removing build/src.linux-x86_64-2.7/fortranobject.c removing build/src.linux-x86_64-2.7/models/msis/msisFortmodule.c removing build/src.linux-x86_64-2.7/fortranobject.h removing build/src.linux-x86_64-2.7/fortranobject.c removing build/src.linux-x86_64-2.7/models/hwm/hwm07module.c removing build/src.linux-x86_64-2.7/fortranobject.h removing build/src.linux-x86_64-2.7/models/tsyganenko/tsygFort-f2pywrappers.f removing build/src.linux-x86_64-2.7/fortranobject.c removing build/src.linux-x86_64-2.7/models/tsyganenko/tsygFortmodule.c excludepattern: applying regex r'^davitpy-0.2/.' exclude_pattern: applying regex r'\/(RCS|CVS|.svn)\/' writing manifest file 'davitpy.egg-info/SOURCES.txt' installing library code to build/bdist.linux-x86_64/egg setting options for 'install_lib' command: running install_lib running build_py running build_ext customize UnixCCompiler customize UnixCCompiler using build_ext customize Gnu95FCompiler Found executable /usr/bin/gfortran customize Gnu95FCompiler customize Gnu95FCompiler using build_ext building 'hwm07' extension compiling C sources C compiler: x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC

compile options: '-Ibuild/src.linux-x86_64-2.7 -I/usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/core/include -I/usr/include/python2.7 -c' x86_64-linux-gnu-gcc: build/src.linux-x86_64-2.7/models/hwm/hwm07module.c In file included from /usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1761:0, from /usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:17, from /usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/arrayobject.h:4, from build/src.linux-x86_64-2.7/fortranobject.h:13, from build/src.linux-x86_64-2.7/models/hwm/hwm07module.c:18: /usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

warning "Using deprecated NumPy API, disable it by " \

^ build/src.linux-x86_64-2.7/models/hwm/hwm07module.c:143:12: warning: ‘f2py_size’ defined but not used [-Wunused-function] static int f2py_size(PyArrayObject* var, ...) ^ x86_64-linux-gnu-gcc: build/src.linux-x86_64-2.7/fortranobject.c In file included from /usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarraytypes.h:1761:0, from /usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/ndarrayobject.h:17, from /usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/arrayobject.h:4, from build/src.linux-x86_64-2.7/fortranobject.h:13, from build/src.linux-x86_64-2.7/fortranobject.c:2: /usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/core/include/numpy/npy_1_7_deprecated_api.h:15:2: warning: #warning "Using deprecated NumPy API, disable it by " "#defining NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION" [-Wcpp]

warning "Using deprecated NumPy API, disable it by " \

^ compiling Fortran 90 module sources Fortran f77 compiler: /usr/bin/gfortran -Wall -ffixed-form -fno-second-underscore -fPIC -O3 -funroll-loops Fortran f90 compiler: /usr/bin/gfortran -Wall -fno-second-underscore -fPIC -O3 -funroll-loops Fortran fix compiler: /usr/bin/gfortran -Wall -ffixed-form -fno-second-underscore -Wall -fno-second-underscore -fPIC -O3 -funroll-loops compile options: '-Ibuild/src.linux-x86_64-2.7 -I/usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/core/include -I/usr/include/python2.7 -c' extra options: '-Jbuild/temp.linux-x86_64-2.7/ -Ibuild/temp.linux-x86_64-2.7/' gfortran:f90: models/hwm/apexcord.f90 models/hwm/apexcord.f90:71.8:

use apexcord
    1

Fatal Error: Cannot read module file 'apexcord.mod' opened at (1), because it was created by a different version of GNU Fortran models/hwm/apexcord.f90:71.8:

use apexcord
    1

Fatal Error: Cannot read module file 'apexcord.mod' opened at (1), because it was created by a different version of GNU Fortran Traceback (most recent call last): File "setup.py", line 66, in "Programming Language :: Python" File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/distutils/core.py", line 169, in setup return old_setup(**new_attr) File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/distutils/command/install.py", line 59, in run r = self.setuptools_run() File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/distutils/command/install.py", line 53, in setuptools_run self.do_egg_install() File "/usr/lib/python2.7/dist-packages/setuptools/command/install.py", line 88, in do_egg_install self.run_command('bdist_egg') File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 185, in run cmd = self.call_command('install_lib', warn_dir=0) File "/usr/lib/python2.7/dist-packages/setuptools/command/bdist_egg.py", line 171, in call_command self.run_command(cmdname) File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/lib/python2.7/dist-packages/setuptools/command/install_lib.py", line 21, in run self.build() File "/usr/lib/python2.7/distutils/command/install_lib.py", line 111, in build self.run_command('build_ext') File "/usr/lib/python2.7/distutils/cmd.py", line 326, in run_command self.distribution.run_command(command) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/distutils/command/build_ext.py", line 234, in run self.build_extensions() File "/usr/lib/python2.7/distutils/command/build_ext.py", line 446, in build_extensions self.build_extension(ext) File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/distutils/command/build_ext.py", line 364, in build_extension depends=ext.depends) File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/distutils/ccompiler.py", line 202, in CCompiler_compile self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File "/usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/distutils/fcompiler/init.py", line 610, in _compile raise CompileError(msg) distutils.errors.CompileError: Command "/usr/bin/gfortran -Wall -fno-second-underscore -fPIC -O3 -funroll-loops -Ibuild/src.linux-x86_64-2.7 -I/usr/local/lib/python2.7/dist-packages/numpy-1.8.1-py2.7-linux-x86_64.egg/numpy/core/include -I/usr/include/python2.7 -c -c models/hwm/apexcord.f90 -o build/temp.linux-x86_64-2.7/models/hwm/apexcord.o -Jbuild/temp.linux-x86_64-2.7/ -Ibuild/temp.linux-x86_64-2.7/" failed with exit status 1

sdelarquier commented 10 years ago

Looks like this may just be a matter of cleaning a precompiled module. Try going to models/hwm and type make clean. Then try to install again. If that does not work, please also provide your gfortran version and we'll look into it.

Thanks!

aburrell commented 10 years ago

Hi Sean,

Welcome to davitpy!

One of your error, here, is caused by having a different version of gfortran compiling the code than was used to compile the f2py module. You’ll need to either re-install f2py with the gfortran compiler you’re currently using or make the different models using the same compiler specified by f2py. Check and see if your local compiler is different than the system compiler.

Also, did you install the dependencies yourself, where they already there, or did you let the install code do it? I found it easiest to use the install shells as a guideline for installing the dependencies before installing davitpy. I’m sure other users here will have some good suggestions.

Cheers, Angeline

On 16 Jul 2014, at 19:15, SeanChu notifications@github.com wrote:

gfortran:f90: models/hwm/apexcord.f90 models/hwm/apexcord.f90:71.8:

use apexcord 1 Fatal Error: Cannot read module file 'apexcord.mod' opened at (1), because it was created by a different version of GNU Fortran models/hwm/apexcord.f90:71.8:

use apexcord 1 Fatal Error: Cannot read module file 'apexcord.mod' opened at (1), because it was

xnchu commented 10 years ago

Thank you both for quick responses. I've followed your advices and found the problem. Solution: When Davitpy is installed, it wrote in the /home/user/.bashrc file the following: "source /home/sean/davitpy/../profile.bash" Every time I open a terminal, it says this file is not found. I changed it to "source /home/sean/davitpy/profile.bash" Now everything works fine. Question: This default might be different for everyone? Or is it the default installation setting should be changed somehow?

asreimer commented 10 years ago

Bug confirmed, report made here: https://github.com/vtsuperdarn/davitpy/issues/97

Closing question.

GWPerryNJIT commented 9 years ago

I'm receiving the same error. I've been following the Davitpy install instructions from the start, using the brew dependencies. I reinstalled scipy and numpy and I still run into the same error.

asreimer commented 9 years ago

@GPerry306 which branch are you trying to install from (master or develop, you can find out by running git branch inside the davitpy directory)?

Perhaps you can try these 2 things: 1) Try deleting the apex.mod file in the models/hwm directory. Then try running python setup.py install --user again. If this doesn't work try the next thing. 2) Don't use the dependency script. Instead try to reinstall the f2py package. You can do this (I think) using pip install --upgrade --force-reinstall f2py

GWPerryNJIT commented 9 years ago

I'm in the 'master' branch.

1) I commented out any reference to 'hwm' in 'setup.py', and everything seemed work out. I'm running a notebook now to make sure everything works and the 'figure' command is giving me an error now. So I don't know what's up.

'f2py' doesn't exist standalone, as far as I'm aware. It's part of the 'numpy' package now, which is why using pip install --upgrade --force-reinstall f2py gives 'Could not find any downloads that satisfy the requirement f2py'.

asreimer commented 9 years ago

I have helped @GPerry306 with installing everything on his mac. The issue wasn't 100% with davitpy but with getting all the dependencies installed properly.

The problems that he ran in to could be easily (hopefully) if the dependencies scripts for mac were updated and worked. This needs to be fixed and I've filed an issue here: https://github.com/vtsuperdarn/davitpy/issues/122