# Error after installing 5.2.1

**URL:** <https://gramps.discourse.group/t/error-after-installing-5-2-1/5162>\
**Category:** Help\
**Created:** [March 25, 2024, 12:11pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162 "2024-03-25T12:11:23Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 25, 2024, 12:11pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/1 "2024-03-25T12:11:23Z")

</div>

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

1. backuped
2. removed 5.1.5 version

```python
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](https://github.com/gramps-project/gramps/tree/v5.2.1)
3. run the commands:

```python
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:**

```python
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:

```python
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:**

```python
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.

---

<div class="post-metadata">

**Author:** ![jacrider](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jacrider](https://gramps.discourse.group/u/jacrider)\
**Post date:** [March 25, 2024, 1:34pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/2 "2024-03-25T13:34:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 25, 2024, 1:39pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/3 "2024-03-25T13:39:50Z")

</div>

> [@jacrider](#):
>
> python3 setup.py build  
> sudo python3 setup.py install --root=/

Executed both. The same:

```python
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'

```

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 25, 2024, 1:41pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/4 "2024-03-25T13:41:29Z")

</div>

What about my PATHs? What should be there?

```python
$PYTHONPATH
$GRAMPS_RESOURCES

```

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 25, 2024, 2:45pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/5 "2024-03-25T14:45:27Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jacrider](https://avatars.discourse-cdn.com/v4/letter/j/b5a626/32.png) [@jacrider](https://gramps.discourse.group/u/jacrider)\
**Post date:** [March 25, 2024, 2:47pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/6 "2024-03-25T14:47:49Z")

</div>

I don’t have either PYTHONPATH or GRAMPS\_RESOURCES set.

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 25, 2024, 2:48pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/7 "2024-03-25T14:48:58Z")

</div>

> [@jacrider](#):
>
> I don’t have either PYTHONPATH or GRAMPS\_RESOURCES set.

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

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 25, 2024, 2:52pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/8 "2024-03-25T14:52:02Z")

</div>

Cleared it.

```python
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:~$

```

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [March 25, 2024, 3:11pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/9 "2024-03-25T15:11:18Z")

</div>

From inside the unzipped tar package, install Gramps with:

```python
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.

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 25, 2024, 3:13pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/10 "2024-03-25T15:13:23Z")

</div>

> [@Nick-Hall](#):
>
> I’ll build a Debian package for you.

Got it, waiting for the package. Thanks!

---

<div class="post-metadata">

**Author:** ![Urchello](https://avatars.discourse-cdn.com/v4/letter/u/c4cdca/32.png) [@Urchello](https://gramps.discourse.group/u/Urchello)\
**Post date:** [March 25, 2024, 3:22pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/11 "2024-03-25T15:22:37Z")

</div>

> [@Nick-Hall](#):
>
> From inside the unzipped tar package, install Gramps with:
> 
> ```python
> sudo pip3 install .
> 
> ```

Yeah, it works for me. Great!  
Maybe it would be better add pip3 command here? [gramps/INSTALL at maintenance/gramps52 · gramps-project/gramps · GitHub](https://github.com/gramps-project/gramps/blob/maintenance/gramps52/INSTALL)

---

<div class="post-metadata">

**Author:** ![Nick-Hall](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/nick-hall/32/95_2.png) [@Nick-Hall](https://gramps.discourse.group/u/Nick-Hall)\
**Post date:** [March 25, 2024, 10:00pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/12 "2024-03-25T22:00:50Z")

</div>

> [@Nick-Hall](#):
>
> I’ll build a Debian package for you.

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

```txt
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.

---

<div class="post-metadata">

**Author:** ![emyoulation](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/emyoulation/32/67_2.png) [@emyoulation](https://gramps.discourse.group/u/emyoulation)\
**Post date:** [March 25, 2024, 10:09pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/13 "2024-03-25T22:09:36Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![jmichault](https://yyz2.discourse-cdn.com/free1/user_avatar/gramps.discourse.group/jmichault/32/2696_2.png) [@jmichault](https://gramps.discourse.group/u/jmichault)\
**Post date:** [March 26, 2024, 9:56pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/14 "2024-03-26T21:56:14Z")

</div>

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

```python
export PYBUILD_INSTALL_ARGS_python3=

```

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

Hope this can help.

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/free1/uploads/gramps/original/1X/2ac1e712b7adf612e31ca08a55419f4cf37c0158.png) [@system](https://gramps.discourse.group/u/system)\
**Post date:** [April 25, 2024, 9:56pm UTC](https://gramps.discourse.group/t/error-after-installing-5-2-1/5162/15 "2024-04-25T21:56:53Z")

</div>

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