philippj / SteamworksPy

A working Python API system for Valve's Steamworks.
MIT License
212 stars 39 forks source link

Unable to instantiate main class in linux #104

Open Wemmy0 opened 3 weeks ago

Wemmy0 commented 3 weeks ago

I cloned the repo and created a library using python setup.py sdist (I'm not sure if this is right, there are a lot of references to a Steamworks.py file that I can't find anywhere)

I then installed this with pip install dist/steamworks-2.0.0.tar.gz which suceeded.

Trying:

from steamworks import STEAMWORKS

steamworks = STEAMWORKS()
steamworks.initialize()

Throws the error:

Traceback (most recent call last):
  File "/home/******/PycharmProjects/SamRevitalised/main.py", line 5, in <module>
    steamworks = STEAMWORKS()
                 ^^^^^^^^^^^^
  File "/home/******/PycharmProjects/SamRevitalised/.venv/lib/python3.12/site-packages/steamworks/__init__.py", line 52, in __init__
    self._initialize()
  File "/home/******/PycharmProjects/SamRevitalised/.venv/lib/python3.12/site-packages/steamworks/__init__.py", line 101, in _initialize
    self._cdll      = CDLL(library_path) # Throw native exception in case of error
                   ^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.12/ctypes/__init__.py", line 379, in __init__
    self._handle = _dlopen(self._name, mode)
                   ^^^^^^^^^^^^^^^^^^^^^^^^^
OSError: /home/******/PycharmProjects/SamRevitalised/SteamworksPy.so: undefined symbol: SteamAPI_Init

This may be due to I'm using this v1.6.1 SteamworksPy.so which seems very outdated but it's the most recent pre-compiled linux build. Trying to build from source results in this build error