Error after installing 5.2.1

Im trying install 5.2.1 version to ubuntu Ubuntu 22.04.2 LTS. My steps:

  1. backuped
  2. removed 5.1.5 version
sudo apt remove gramps
sudo rm -rf /usr/local/share/gramps
sudo rm -rf /usr/local/lib/python3.x/site-packages/gramps
  1. removed .egg from /usr/local/bin/gramps
  2. downloaded and unpached zip from here GitHub - gramps-project/gramps at v5.2.1
  3. run the commands:
python3 setup.py build
sudo python3 setup.py install

Then I tried to run the app:
yurii@yurii-desktop:~/Downloads/gramps-5.2.1$gramps
ResourcePath.ERROR: Unable to determine resource path

Checked paths:

yurii@yurii-desktop:~/Downloads/gramps-5.2.1$ echo $PYTHONPATH

yurii@yurii-desktop:~/Downloads/gramps-5.2.1$ echo $GRAMPS_RESOURCES

yurii@yurii-desktop:~/Downloads/gramps-5.2.1$ 

The paths were empty. I added them, but not sure they are true:

yurii@yurii-desktop:~/Downloads/gramps-5.2.1$ echo $PYTHONPATH
/usr/local/lib/python3.10/dist-packages:
yurii@yurii-desktop:~/Downloads/gramps-5.2.1$ echo $GRAMPS_RESOURCES
/usr/local/lib/python3.10/dist-packages/gramps

Now I receive another error:

yurii@yurii-desktop:~/Downloads/gramps-5.2.1$ gramps
Traceback (most recent call last):
  File "/usr/local/bin/gramps", line 4, in <module>
    __import__('pkg_resources').run_script('gramps==5.2.1', 'gramps')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 656, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1441, in run_script
    raise ResolutionError(
pkg_resources.ResolutionError: Script 'scripts/gramps' not found in metadata at '/home/yurii/Downloads/gramps-5.2.1/gramps.egg-info'
yurii@yurii-desktop:~/Downloads/gramps-5.2.1$

What is wrong here? Thanks.

The INSTALL file needs to be updated. I believe the installation
commands need to be

python3 setup.py build
sudo python3 setup.py install --root=/

This was covered on this list when discussing problems with version
5.2.0, although I couldn’t find which thread it was in when I was
looking yesterday, so I was working from memory, but the above did seem
to work for me.

Allen Crider

1 Like

Executed both. The same:

yurii@yurii-desktop:~/Downloads/gramps-5.2.1$ gramps
Traceback (most recent call last):
  File "/usr/local/bin/gramps", line 4, in <module>
    __import__('pkg_resources').run_script('gramps==5.2.1', 'gramps')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 656, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1441, in run_script
    raise ResolutionError(
pkg_resources.ResolutionError: Script 'scripts/gramps' not found in metadata at '/usr/local/lib/python3.10/dist-packages/gramps-5.2.1.egg-info'

What about my PATHs? What should be there?

$PYTHONPATH
$GRAMPS_RESOURCES

Is it possible install 5.2.1 via sudo apt … ? I see 5.1 only in official repo

I don’t have either PYTHONPATH or GRAMPS_RESOURCES set.

1 Like

got it. So, I also will clear them. They were empty earlier

Cleared it.

yurii@yurii-desktop:~$ export PYTHONPATH=""
yurii@yurii-desktop:~$ export GRAMPS_RESOURCES=""
yurii@yurii-desktop:~$ gramps
Traceback (most recent call last):
  File "/usr/local/bin/gramps", line 4, in <module>
    __import__('pkg_resources').run_script('gramps==5.2.1', 'gramps')
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 656, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/usr/lib/python3/dist-packages/pkg_resources/__init__.py", line 1441, in run_script
    raise ResolutionError(
pkg_resources.ResolutionError: Script 'scripts/gramps' not found in metadata at '/usr/local/lib/python3.10/dist-packages/gramps-5.2.1.egg-info'
yurii@yurii-desktop:~$

From inside the unzipped tar package, install Gramps with:

sudo pip3 install .

Don’t set the GRAMPS_RESOURCES environment variable unless you know what you are doing.

I’ll build a Debian package for you.

1 Like

Got it, waiting for the package. Thanks!

Yeah, it works for me. Great!
Maybe it would be better add pip3 command here? gramps/INSTALL at maintenance/gramps52 · gramps-project/gramps · GitHub

I’m getting the following error when building the package:

E: gramps source: source-is-missing [gramps/plugins/webstuff/index.html]

I think that this points to a bug in our setup.py script, but when I fix it I still get the same error. We need someone who understands Debian packaging to have a look at this.

1 Like

And our Debian Package Manager doesn’t have a Discourse account. So that question will probably need to be cross-posted to the Developer maillist.

I discovered by accident that you can avoid this error by using the following line in debian/rules:

export PYBUILD_INSTALL_ARGS_python3=

(instead of export PYBUILD_INSTALL_ARGS_python3=--resourcepath=/usr/share --force)

Hope this can help.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.