Note the pip package is keystone-engine -- it will install a directory named keystone which was conflicting with the keystone (open identity server) when pince is launched.

Run as root, similar to the example you showed (it's working):

    $ sudo python3 -m venv --system-site-packages ve
    $ sudo ve/bin/python -m pip install -U keystone-engine
    $ sudo ve/bin/python
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import keystone
    >>> keystone.__file__
'/media/PNY64GB/debian-bug-1091740/ve/lib/python3.11/site-packages/keystone/__init__.py'


I ran the launcher script that pince includes and I get the following after editing
to it just runs the interpreter:

    Python 3.11.2 (main, Nov 30 2024, 21:22:50) [GCC 12.2.0] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import keystone
    >>> keystone.__file__
'/home/william/Apps/Emulators/pince/.venv/PINCE/lib/python3.11/site-packages/keystone/__init__.py'
    >>> import sys
    >>> sys.path
    ['', '/usr/lib/python311.zip', '/usr/lib/python3.11',
    '/usr/lib/python3.11/lib-dynload',
'/home/william/Apps/Emulators/pince/.venv/PINCE/lib/python3.11/site-packages']

So the issue seems to be something specific to pince.

I will have to investigate this further and report back on the pince issue I opened earlier
before filing this bug report.


On 12/30/24 4:26 PM, Stefano Rivera wrote:
Control: tag -1 + unreproducible moreinfo

         1. I installed python3-keystone (openstack identity service)
         2. I installed a python program in a virtual environment from
         (https://github.com/korcankaraokcu/PINCE) this application installs
         keystone-engine (an on-the-fly assembler) via pip into the virtual
         environment using the venv module.
Can you try to reproduce this more minimally?

I did:

# apt install --no-install-recommends python3-keystone python3-venv
# python3 -m venv --system-site-packages ve
# ve/bin/python -m pip install -U keystone
# ve/bin/python
import keystone
keystone.__file__
'/root/ve/lib/python3.11/site-packages/keystone/__init__.py'
import sys
sys.path
['', '/usr/lib/python311.zip', '/usr/lib/python3.11', 
'/usr/lib/python3.11/lib-dynload', '/root/ve/lib/python3.11/site-packages', 
'/usr/local/lib/python3.11/dist-packages', '/usr/lib/python3/dist-packages']

All looks good to me.

Stefano

Reply via email to