Skip to content

Conversation

@jpatiani
Copy link

Fix import local file to support python 3.7

init.py:
from . import tide
from . import astro
from . import constituent
from . import nodal_corrections

constituent.py:
from . import nodal_corrections as nc

tide.py:
from .astro import astro
from . import constituent

Fix method error (reduce). In python 3.7, function reduce located in package functools. Add following command to constituent.py:
from functools import reduce
pytides.zip

Paul M Furley and others added 6 commits June 10, 2014 15:24
Add a test runner script which runs any units tests using nosetests
(there currently aren't any) and will eventually run PEP8 tests.

This will run on Travis CI after visiting https://travis-ci.org/profile and
enabling it for the repo.

In Travis CI, we need to use system site packages for numpy and scipy,
see:
http://danielnouri.org/notes/2012/11/23/use-apt-get-to-install-python-dependencies-for-travis-ci/

For Travis to try to install the right packages (not numpy/scipy),
create two requirements files: `requirements/_common.txt` and
`requirements/_numpy_and_scipy.txt`.

As a developer, you can install `./requirements.txt`. As Travis, you can
install `./requirements_for_travis.txt`

In the `.travis.yml` file we also use the environment variables for
ATLAS, BLAS etc as suggested by Sam in the README:

```
export LAPACK=/usr/lib/liblapack.so
export ATLAS=/usr/lib/libatlas.so
export BLAS=/usr/lib/libblas.so
```
- tide.py
- constituents.py
- astro.py
- nodal_corrections.py

http://legacy.python.org/dev/peps/pep-0008/
@nicholas-balasus
Copy link

Hello! Sorry to bother you...

How can I make these changes in the version I get via "pip install pytides"?

I am trying to run the example on python 3.8 and getting the error

ModuleNotFoundError: No module named 'tide' (in init.py)

Thank you fro any help!

@nicholas-balasus
Copy link

Hello! Sorry to bother you...

How can I make these changes in the version I get via "pip install pytides"?

I am trying to run the example on python 3.8 and getting the error

ModuleNotFoundError: No module named 'tide' (in init.py)

Thank you fro any help!

Actually, I was able to go into my directory through anaconda and edit the files with the above changes directly. Thank you for making this!

@deborarodriguesp
Copy link

Hello! So, I have this issue, and I downloaded your files, but it still gave me errors. But I have no idea how to solve.
Do you have any idea of what the problem may be?

Thanks in advance!

Traceback (most recent call last):
  File "D:\DOUTORAMENTO\Tide\Tide_Extractor\predict_tidal_signal.py", line 2, in <module>
    import pytides
  File "C:\Users\Debora\anaconda3\envs\tide\Lib\site-packages\pytides\__init__.py", line 3, in <module>
    from . import tide
  File "C:\Users\Debora\anaconda3\envs\tide\Lib\site-packages\pytides\tide.py", line 2, in <module>
    from collections import OrderedDict, Iterable
ImportError: cannot import name 'Iterable' from 'collections' (C:\Users\Debora\anaconda3\envs\tide\Lib\collections\__init__.py)

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

Successfully merging this pull request may close these issues.

4 participants