a-hurst / klibs

A simple Python framework for writing cognitive psychology experiments
7 stars 1 forks source link

klibs-script.py #21

Closed abidi-wq closed 9 months ago

abidi-wq commented 1 year ago

Hello,

I didn't manage to open the program. an error message appears : "File "C:\Users\utilisateur_invité\AppData\Local\Programs\Python\Python36\Scripts\klibs-script.py", line 1 SyntaxError: Non-UTF-8 code starting with '\xe9' in file C:\Users\utilisateur_invité\AppData\Local\Programs\Python\Python36\Scripts\klibs-script.py on line 1, but no encoding declared; see http://python.org/dev/peps/pep-0263/ for details"

Best regards, Malek

a-hurst commented 1 year ago

Looked into this a bit more, seems to be a bug in setuptools that's fixed in newer versions of Python: https://github.com/pypa/setuptools/issues/1246

abidi-wq commented 10 months ago

Hello Austin,

I didn't manage to open the program, the following error message appears :

[92m Now Loading KLibs Environment ←[0m ←[0m Traceback (most recent call last): File "", line 198, in _run_module_as_main File "", line 88, in _run_code File "C:\Users\wied\AppData\Local\Programs\Python\Python312\Scripts\klibs.exe__main.py", line 7, in File "C:\Users\wied\AppData\Local\Programs\Python\Python312\Lib\site-packages\klibs\main__.py", line 191, in klibs_main commandscmd File "C:\Users\wied\AppData\Local\Programs\Python\Python312\Lib\site-packages\klibs\cli.py", line 290, in run P.initialize_runtime(project_name, seed) File "C:\Users\wied\AppData\Local\Programs\Python\Python312\Lib\site-packages\klibs\KLParams.py", line 237, in initialize_runtime from pkg_resources import resource_filename, resource_string ModuleNotFoundError: No module named 'pkg_resources'

Best regards, Malek

a-hurst commented 10 months ago

Hey @abidi-wq, this is a known bug with Python 3.12 that I need to fix. I'll try and do that shortly, but in the meantime if you install Python 3.10 or 3.11 the issue should go away!

a-hurst commented 10 months ago

Actually, running pip install setuptools should also fix it on Python 3.12. Will still try to fix this properly so the extra command isn't needed.

abidi-wq commented 10 months ago

Hello Austin, I installed python 3.10 and it works many thanks. However, running pip install setuptools on Python 3.12 didn't fix the problem.