Python plugin fails when rebuilding requirement

When using the python plugin, running the snapcraft build twice in a row will result in a failure to build because of a prompt from pip. Here is the output I’m getting:

$ snapcraft --debug                
Launching a VM.
snap "snapd" has no updates available                                           
Updating pull step for joinmarket (source changed)
Obtaining file:///root/project/jmbase (from -r /root/parts/joinmarket/build/requirements/base.txt (line 1))
The file /root/parts/joinmarket/python-packages/ exists. (i)gnore, (w)ipe, (b)ackup, (a)bort ERROR: Exception:
Traceback (most recent call last):
  File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/cli/", line 186, in _main
    status =, args)
  File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/commands/", line 135, in run
  File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/", line 177, in resolve
    discovered_reqs.extend(self._resolve_one(requirement_set, req))
  File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/", line 333, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/", line 265, in _get_abstract_dist_for
    return self.preparer.prepare_editable_requirement(req)
  File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/operations/", line 559, in prepare_editable_requirement
  File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/req/", line 721, in archive
    display_path(archive_path), ('i', 'w', 'b', 'a'))
  File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/utils/", line 223, in ask_path_exists
    return ask(message, options)
  File "/root/parts/joinmarket/install/lib/python3.6/site-packages/pip/_internal/utils/", line 241, in ask
    response = input(message)
EOFError: EOF when reading a line
Failed to run '/root/stage/usr/bin/python3 -m pip download --disable-pip-version-check --dest /root/parts/joinmarket/python-packages --requirement /root/parts/joinmarket/build/requirements/gui.txt': Exited with code 2.

Here is my snapcraft.yml. I’m trying to get it working for the project.

name: joinmarket
base: core18
version: master
summary: Software to assist in creating bitcoin CoinJoin transactions
description: |
  JoinMarket is software to create a special kind of bitcoin transaction called a CoinJoin transaction. It's aim is to improve the confidentiality and privacy of bitcoin transactions.
confinement: devmode
grade: devel
#icon: icon.png

      - kde-neon
    command: echo "Nothing here"
      - network
      - network-bind
      - desktop
      - desktop-legacy
      - x11
      - wayland
      - home

    plugin: python
    source: .
      - requirements/gui.txt
      - build
      build: opt/joinmarket

Should I report this as a bug? The only workarounds I have found are snapcraft clean joinmarket to remove the part, or entering the container and deleting the *.zip files which are already built.