Closed hunkus closed 1 year ago
You likely installed zugbruecke
system-wide, e.g. with sudo
(sudo pip install zugbruecke
). As a result, zugbruecke
tries to place its Wine prefix under /usr/share/wenv/win32
where your user account likely does not have write permissions.
There are at least two ways forward.
1) You can install zugbruecke
into a virtual environment where your user has full write permissions, e.g.
python -m venv env
source env/bin/activate
pip install zugbruecke
2) You can instead leave zugbruecke
where it is and tell it to place its Wine prefix somewhere else. zugbruecke
delegates this task to a separate package called wenv
, which can be told where to put the Wine prefix. One option is to do this via a environment variable when starting the Python interpreter:
WENV_WINEPREFIX=/home/user/some/folder python
Alternatively, the Wine prefix path can also be set at runtime by manually initializing a session as follows:
from zugbruecke import CtypesSession
ctypes = CtypesSession(wineprefix = '/home/user/some/folder')
However, the older version(0.0.15) is working fine in the current environment.
Yes, the mechanism for creating and managing Wine prefixes was changed from 0.0.15 to 0.1.0. Before, they were automatically placed under /home/user/.zugbruecke
. Unfortunately, this created it own set of issues, so now, the default location is {sys.prefix}/share/
. As in your case, this can result in problems if the package is installed system-wide, i.e. {sys.prefix} == '/usr'
.
Can this issue be marked as resolved?
Can this issue be marked as resolved?
Thank you, your kind and detailed answer helped me a lot.
Currently, I am using the latest image(September 22nd 2022) on Raspberry Pi 4B. After installing the latest version(0.1.0) and running the example code as shown below, the following error message appears.
I installed it using pip, is there anything else I need to configure? However, the older version(0.0.15) is working fine in the current environment.