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

pywafo install error #31

Open
eluczko opened this issue Aug 15, 2016 · 5 comments
Open

pywafo install error #31

eluczko opened this issue Aug 15, 2016 · 5 comments

Comments

@eluczko
Copy link

eluczko commented Aug 15, 2016

Hi, I was wondering if anyone could help me find out why my wafo toolbox won't install properly. It appears to be an issue with pbr. I tried installing a newer version of pbr with little success in case it was a versioning issue. Please excuse my very limited python knowledge.

Amphitrite pywafo-master # python setup.py bdist_wheel -d dist
ERROR:root:Error parsing
Traceback (most recent call last):
File "/home/pytools/pywafo-master/.eggs/pbr-1.10.0-py2.7.egg/pbr/core.py", line 111, in pbr
attrs = util.cfg_to_args(path, dist.script_args)
File "/home/pytools/pywafo-master/.eggs/pbr-1.10.0-py2.7.egg/pbr/util.py", line 246, in cfg_to_args
pbr.hooks.setup_hook(config)
File "/home/pytools/pywafo-master/.eggs/pbr-1.10.0-py2.7.egg/pbr/hooks/init.py", line 25, in setup_hook
metadata_config.run()
File "/home/pytools/pywafo-master/.eggs/pbr-1.10.0-py2.7.egg/pbr/hooks/base.py", line 27, in run
self.hook()
File "/home/pytools/pywafo-master/.eggs/pbr-1.10.0-py2.7.egg/pbr/hooks/metadata.py", line 26, in hook
self.config['name'], self.config.get('version', None))
File "/home/pytools/pywafo-master/.eggs/pbr-1.10.0-py2.7.egg/pbr/packaging.py", line 725, in get_version
raise Exception("Versioning for this project requires either an sdist"
Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. Are you sure that git is installed?
error in wafo setup command: Error parsing /home/pytools/pywafo-master/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository. Are you sure that git is installed?

@Bart-Ver
Copy link

+1

When I try to load the package manually:
import sys
sys.path = ['../wafo2/pywafo-master/wafo']+sys.path
import wafo
I get
ImportError: cannot import name misc

I also got that error when I tried the pip zip version, corrected a version problem with the new scipy, and then tried to load the module.

@pbrod
Copy link
Member

pbrod commented Aug 18, 2016

If you have a linux machine it should be quite straight forward to compile and install the distribution. However, if you have a windows machine it is (I am sorry to say) not possible at the moment to install the complete package. The reason is that the toolchain for compiling fortran on windows is broken. If you are not using any of the fortran compiled libraries, you can download pywafo from github to a folder of your liking and do the following at the dos-prompt:

python.exe setup.py develop

you will get some warnings that some libraries are not compiled, but all the stuff that is pure python code you can run.

See also the discussion on issue #12 and #29

@Bart-Ver
Copy link

I'm using linux... The installation of the wafo-0.2.1.tar.gz worked well, however, it is not compatible with the newest version of scipy, and when I corrected the code so that it 'assumes' it is, I get the ImportError.

@Bart-Ver
Copy link

Hi,

I've created a virtual env to install pywafo.
When I clone the git master, installation goes well (except for many warnings during compilation).
However, when I try to import wafo, I get the error below.
Could you let me know which version of numpy and scipy you are using?

Thanks,
Bart

Traceback (most recent call last):
File "", line 1, in
File "/home/bart/wafo-test/wafo/local/lib/python2.7/site-packages/wafo/init.py", line 9, in
from . import objects
File "/home/bart/wafo-test/wafo/local/lib/python2.7/site-packages/wafo/objects.py", line 16, in
from wafo.transform.core import TrData
File "/home/bart/wafo-test/wafo/local/lib/python2.7/site-packages/wafo/transform/init.py", line 8, in
from . import estimation
File "/home/bart/wafo-test/wafo/local/lib/python2.7/site-packages/wafo/transform/estimation.py", line 9, in
from ..stats import edf, skew, kurtosis
File "/home/bart/wafo-test/wafo/local/lib/python2.7/site-packages/wafo/stats/init.py", line 341, in
from .distributions import *
File "/home/bart/wafo-test/wafo/local/lib/python2.7/site-packages/wafo/stats/distributions.py", line 10, in
from ._distn_infrastructure import (entropy, rv_discrete, rv_continuous,
File "/home/bart/wafo-test/wafo/local/lib/python2.7/site-packages/wafo/stats/_distn_infrastructure.py", line 2, in
from scipy.stats._distn_infrastructure import * # @UnusedWildImport
ImportError: No module named _distn_infrastructure

@Bart-Ver
Copy link

Bart-Ver commented Sep 6, 2016

Another update.
I started from a new virtualenv, and installed wafo like it says in the readme. (Without installing numpy myself first!).

When loading wafo and running the test, that results in the error-output below. (Only the first part of the test ouput is shown, there is many more after that...)

Thanks,
Bart

import wafo as wf
wafo/plotbackend.py:22: UserWarning: wafo: Unable to load matplotlib.pyplot as plotbackend
warnings.warn('wafo: Unable to load matplotlib.pyplot as plotbackend')
wafo/misc.py:27: UserWarning: c_library not found. Check its compilation.
warnings.warn('c_library not found. Check its compilation.')
wafo/kdetools.py:30: UserWarning: fig import only supported on Windows
warnings.warn('fig import only supported on Windows')
wafo/gaussian.py:14: UserWarning: mvn not found. Check its compilation.
warnings.warn('mvn not found. Check its compilation.')
wafo/gaussian.py:19: UserWarning: mvnprdmod not found. Check its compilation.
warnings.warn('mvnprdmod not found. Check its compilation.')
wafo/gaussian.py:24: UserWarning: rindmod not found. Check its compilation.
warnings.warn('rindmod not found. Check its compilation.')
wafo/spectrum/core.py:36: UserWarning: Compile the c_library.pyd again!
warnings.warn('Compile the c_library.pyd again!')
wafo/spectrum/core.py:41: UserWarning: Compile the cov2mod.pyd again!
warnings.warn('Compile the cov2mod.pyd again!')
fig import only supported on Windows
wf.test(coverage=True, doctests=True)
Running unit tests and doctests for wafo
NumPy version 1.11.1
NumPy relaxed strides checking option: False
NumPy is installed in /home/bart/wafo-virt/local/lib/python2.7/site-packages/numpy
Python version 2.7.12 (default, Jul 1 2016, 15:12:24) [GCC 5.4.0 20160609]
nose version 1.3.7
nose.plugins.cover: ERROR: Coverage not available: unable to import coverage module
EEFFFFFFFEFFFFFFFFFFFEFFFE__main__:1: VisibleDeprecationWarning: converting an array with ndim > 0 to an index will result in an error in the future
main:1: VisibleDeprecationWarning: converting an array with ndim > 0 to an index will result in an error in the future
Fwafo/spectrum/models.py:559: UserWarning:
Hm0=10,Tp=11 is outside the JONSWAP range.
The validity of the spectral density is questionable.

warnings.warn(txt0)
F..FFFF.FFFFFFFFFFFwafo/interpolate.py:755: RuntimeWarning: invalid value encountered in true_divide

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