narthur/pyminder

SyntaxError: invalid syntax for pyminder-0.6.2 on Python 3.5.2, missing dependency "natlibpy" for Python 3.6

matkoniecz opened this issue · 6 comments

Not sure is this simply a bug, or is pyminder-0.6.2 released with a too low minimum Python version

python run.py 
Traceback (most recent call last):
  File "run.py", line 2, in <module>
    from pyminder.pyminder import Pyminder
  File "/home/mateusz/.local/lib/python3.5/site-packages/pyminder/pyminder.py", line 7
    _beeminder: Beeminder = None
              ^
SyntaxError: invalid syntax

python --version
Python 3.5.2

I tried with python3.6:

pip3.6 install --user pyminder
Collecting pyminder
  Using cached https://files.pythonhosted.org/packages/d1/47/16d1ba0d7863580ea2536384bc8896dcfdd063d5a553e77c873065e47afb/pyminder-0.6.2-py3-none-any.whl
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from pyminder) (2.9.1)
Installing collected packages: pyminder
Successfully installed pyminder-0.6.2
python3.6 run.py 
Traceback (most recent call last):
  File "run.py", line 2, in <module>
    from pyminder.pyminder import Pyminder
  File "/home/mateusz/.local/lib/python3.6/site-packages/pyminder/pyminder.py", line 2, in <module>
    from pyminder.goal_factory import GoalFactory
  File "/home/mateusz/.local/lib/python3.6/site-packages/pyminder/goal_factory.py", line 2, in <module>
    from natlibpy.factory import Factory
ModuleNotFoundError: No module named 'natlibpy'
Error in sys.excepthook:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
    from apport.fileutils import likely_packaged, get_recent_crashes
  File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
    from apport.report import Report
  File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
    import apport.fileutils
  File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
    from apport.packaging_impl import impl as packaging
  File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
    import apt
  File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
    import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'

Original exception was:
Traceback (most recent call last):
  File "run.py", line 2, in <module>
    from pyminder.pyminder import Pyminder
  File "/home/mateusz/.local/lib/python3.6/site-packages/pyminder/pyminder.py", line 2, in <module>
    from pyminder.goal_factory import GoalFactory
  File "/home/mateusz/.local/lib/python3.6/site-packages/pyminder/goal_factory.py", line 2, in <module>
    from natlibpy.factory import Factory
ModuleNotFoundError: No module named 'natlibpy'

Thank you for the report! Yes, the minimum version is too low.

It seems that also natlibpy is missing, I managed to run it on Python 3.6 after manually installing it.

@matkoniecz Right... It's specified in requirements.txt, but how to install the dependencies from that file needs to be added to the readme.

I think it should rather go into

install_requires=["requests"],
as this is a library, not into requirements.txt

See https://python-packaging.readthedocs.io/en/latest/dependencies.html (seems to be confirmed also by https://caremad.io/posts/2013/07/setup-vs-requirement/)

0.7.1 (958ae84) should resolve this. @matkoniecz let me know if you run into these issues again.