cpbotha / nvpy

Simplenote syncing note-taking application, inspired by Notational Velocity and ResophNotes, but uglier and cross-platformerer.
Other
849 stars 114 forks source link

Installation from git repository fails #168

Closed carlosfilhoadm closed 5 years ago

carlosfilhoadm commented 5 years ago

Hi, I'm trying to install nvPY directly from the repo in my home directory (~/nvPY) using git, with no success. I'm using ArchLinux. These are my steps:

  1. Install dependencies python2-docutils, python2-markdown, python2-pip, python2-setuptools, tk
  2. Install simplenote.py using pip: pip2 install --user simplenote
  3. Clone the repo: git clone https://github.com/cpbotha/nvpy.git ~/nvPY

When I try to run it with 'python2 ~/nvPY/nvpy/nvpy.py' I get these errors:

Traceback (most recent call last): File "/home/carlos/nvPY/nvpy/nvpy.py", line 37, in from notes_db import NotesDB, SyncError, ReadError, WriteError File "/home/carlos/nvPY/nvpy/notes_db.py", line 31, in from .debug import wrap_buggy_function ValueError: Attempted relative import in non-package

When I try 'cd ~/nvPY && python2 nvpy' I get these other errors:

Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main "main", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/home/carlos/nvPY/nvpy/main.py", line 1, in import nvpy File "nvpy/nvpy.py", line 37, in from notes_db import NotesDB, SyncError, ReadError, WriteError File "nvpy/notes_db.py", line 31, in from .debug import wrap_buggy_function ValueError: Attempted relative import in non-package

Is anybody else having similar issues? Thanks.

yuuki0xff commented 5 years ago

Please try to execute following commands.

$ cd ~/nvPY/
$ python2 -m nvpy 
brightghost commented 5 years ago

I'm seeing the exact same behavior on Debian stable, even launching with -m the way you suggested (though I have installed with pip to /home/swlkr/.local/lib/python2.7/site-packages/nvpy). Trying to install the latest release to diagnose a Simplenote connection error I am seeing, will open a separate issue for that.

hbayindir commented 5 years ago

Debian testing is also exhibiting the same problem, below is the trace with -m flag.

$python2 -m nvpy.py
Traceback (most recent call last):
  File "/usr/lib/python2.7/runpy.py", line 163, in _run_module_as_main
    mod_name, _Error)
  File "/usr/lib/python2.7/runpy.py", line 102, in _get_module_details
    loader = get_loader(mod_name)
  File "/usr/lib/python2.7/pkgutil.py", line 462, in get_loader
    return find_loader(fullname)
  File "/usr/lib/python2.7/pkgutil.py", line 472, in find_loader
    for importer in iter_importers(fullname):
  File "/usr/lib/python2.7/pkgutil.py", line 428, in iter_importers
    __import__(pkg)
  File "nvpy.py", line 37, in <module>
    from notes_db import NotesDB, SyncError, ReadError, WriteError
  File "notes_db.py", line 33, in <module>
    from .debug import wrap_buggy_function
ValueError: Attempted relative import in non-package
yuuki0xff commented 5 years ago

@hbayindir I apologise for the late reply. The command to execute is 'python2 -m nvpy'. Please remove the ".py" suffix.