nvpy Failed to Start after Upgrade

nvpy is available in the AUR and if you use a AUR helper like yaourt, you can install with:

$ yaourt -Sy nvpy-git

After upgrading today, it no longer starts:

[andy@home-pc ~]$ nvpy 
Traceback (most recent call last):
  File "/usr/bin/nvpy", line 6, in <module>
    from pkg_resources import load_entry_point
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3126, in <module>
    @_call_aside
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3110, in _call_aside
    f(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3139, in _initialize_master_working_set
    working_set = WorkingSet._build_master()
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 581, in _build_master
    ws.require(__requires__)
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 898, in require
    needed = self.resolve(parse_requirements(requirements))
  File "/usr/lib/python2.7/site-packages/pkg_resources/__init__.py", line 784, in resolve
    raise DistributionNotFound(req, requirers)
pkg_resources.DistributionNotFound: The 'simplenote>=2.0.0' distribution was not found and is required by nvpy

There doesn’t seem to be a simplenote package available in the AUR. We should however be able to install simplenote.py via pip. If you run Arch Linux, I generally recommend you avoid pip and stick to the AUR when ever possible. Until now I’d managed to avoid the need for it. Therefore it must be installed; and as nvpy uses python2.7, we actually need to install pip2.

$ sudo pacman -Sy python2-pip

Now we can search the package we want to install.

$ pip2.7 search simplenote
simplenote (2.1.0)         - Python library for the simplenote.com API
simplenote-jekyll (0.1.2)  - 
sncli (0.3.0)              - Simplenote Command Line Interface
noterpy (0.1.1)            - A python client for SimpleNote (simplenote.com)
ever2simple (2.0)          - Migrate from evernote to simplenote with markdown formatting
nvpy (1.0.0)               - A cross-platform simplenote-syncing note-taking app inspired by Notational Velocity.
  INSTALLED: 1.0.0 (latest)

As I already mentioned, I really don’t like using pip on Arch Linux based distros. As such I install it using the --user option.

 
$ pip2.7 install --user simplenote
Collecting simplenote
  Downloading https://files.pythonhosted.org/packages/2a/c8/ca08a28c2db89eddc2c70eb4742e23df9f00b31c863af83bc9d930fbaf15/simplenote-2.1.0.tar.gz
Installing collected packages: simplenote
  Running setup.py install for simplenote ... done
Successfully installed simplenote-2.1.0

Now you should hopefully be able to launch nvpy without any issues.

Be the first to comment

Leave a Reply