Snapcraft pull error

i have building a snap, but i get an error on snapcraft pulling stage.
here, i am currently running ubuntu 20.04 and base of my snap is ‘core’.

output of snapcraft --debug command is as follow,

Launching a VM.
Downloading snap 'chromium'                                                     
Pulling anonymousmail 
Failed to run '/root/parts/anonymousmail/install/usr/bin/python3 -m pip': Exited with code 1.

snapcraft.yaml file::

name: anonymousmail # you probably want to 'snapcraft register <name>'
base: core # the base snap is the execution environment for this snap
version: '0.1' # just for humans, typically '1.2+git' or '1.3.2'
summary: summary
description: |
  description

grade: stable # must be 'stable' to release into candidate/stable channels
confinement: strict # use 'strict' once you have the right plugs and slots

parts:
  anonymousmail:
    plugin: python
    python-version: python3
    source: .
    stage-snaps:
      - chromium/latest/stable

apps:
  anonymousmail:
    command: bin/anonymousmail

python setup.py file as follow::

from setuptools import setup

setup(

	name='anonymousmail',
	version='0.1',
	author='author',
	description='desc',
	py_modules=['anonymousmail'],
	install_requires=['selenium'],
	entry_points={
		'console_scripts':[
			'anonymousmail:anonymousmail:main',
		]
	},

)

i don’t understand what is problem. can anyone explain this to me??
what can i do to solve this error??

Thanks.

If you use base: core20 (remove python-version), you can debug a little easier by running:
bash -x /root/parts/anonymousmail/run/build.sh when dropped into a shell by --debug.

it’s worked. thanks @cjp256.

1 Like