foxBMS / foxbms-2

foxBMS 2, online documentation at https://docs.foxbms.org
https://foxbms.org
Other
263 stars 121 forks source link

Toolchain installation error #48

Closed niktwo17 closed 3 months ago

niktwo17 commented 3 months ago

Hi, I have followed the instructions for setting up the environment here , but I am getting strange errors. Happened both with source and latest release:

PS C:\Users\nremi\Documents\foxbms-2> tools\utils\cmd\run-python-script.bat tests\env\packages_test.py -f tests\env\conda_env_win32.json Traceback (most recent call last): File "C:\Users\nremi\Documents\foxbms-2\tests\env\packages_test.py", line 156, in main() File "C:\Users\nremi\Documents\foxbms-2\tests\env\packages_test.py", line 96, in main raise BaseException("Environments differ.") BaseException: Environments differ. PS C:\Users\nremi\Documents\foxbms-2> tools\utils\cmd\run-python-script.bat tests\env\packages_test.py -f tests\env\conda_env_win32.json Traceback (most recent call last): File "C:\Users\nremi\Documents\foxbms-2\tests\env\packages_test.py", line 156, in main() File "C:\Users\nremi\Documents\foxbms-2\tests\env\packages_test.py", line 96, in main raise BaseException("Environments differ.") BaseException: Environments differ.

PS C:\Users\nremi\Documents\foxbms-2> .\waf configure Waf: The wscript in 'C:\Users\nremi\Documents\foxbms-2' is unreadable Traceback (most recent call last): File "C:\Users\nremi\Documents\foxbms-2\tools\waf3-2.0.22-1241519b19b496207abef1f72bbf61c2\waflib\Scripting.py", line 102, in waf_entry_point set_main_module(wscript) File "C:\Users\nremi\Documents\foxbms-2\tools\waf3-2.0.22-1241519b19b496207abef1f72bbf61c2\waflib\Scripting.py", line 142, in set_main_module Context.g_module=Context.load_module(file_path) File "C:\Users\nremi\Documents\foxbms-2\tools\waf3-2.0.22-1241519b19b496207abef1f72bbf61c2\waflib\Context.py", line 362, in load_module exec(compile(code,path,'exec'),module.dict) File "C:\Users\nremi\Documents\foxbms-2\wscript", line 61, in import jsonschema ModuleNotFoundError: No module named 'jsonschema'`

Thanks for your support!

foxBMS commented 3 months ago

Dear @niktwo17,

Then open a new cmd.exe and try running waf configure in the repository. It should work fine then.

Best regards, The foxBMS Team


edit: There was an error in the list of pip packages that has been fixed by this edit.

niktwo17 commented 3 months ago

Hi, thanks for your reply - unfortunately the error persists - waf configure and ide.bat still fail. (all mentioned packages were already present in the environment, nothing was newly installed, except for a version error for pysimplegui):

ERROR: Could not find a version that satisfies the requirement pysimplegui==4.55.1 (from versions: 2.7.0, 4.60.5, 5.0.0, 5.0.2, 5.0.3, 5.0.4, 5.0.5) ERROR: No matching distribution found for pysimplegui==4.55.1

I think I found the root cause - apparently legacy versions for pysimplegui were deleted recently, which now breaks the hardcoded v4.55.1 dependency: https://www.reddit.com/r/Python/comments/1d8d4iv/psa_pysimplegui_has_deleted_almost_all_old_lgpl/ I tried using 4.60.5 to replace it, but this breaks some dependency later on:

image

Edit: I upgraded all pysimplegui references in the codebase from 4.55.1 to 4.60.5, now everything works fine. Question is if 4.60.5 will stay available as pysimplegui went for-profit? https://pypi.org/project/PySimpleGUI/#history

Best, Niklas

foxBMS commented 3 months ago

Please use

Does it then work for you?

niktwo17 commented 3 months ago

Hi, this will still not work: The conda-update-env.bat will not install the environment correctly, the

ERROR: Could not find a version that satisfies the requirement pysimplegui==4.55.1 (from versions: 2.7.0, 4.60.5, 5.0.0, 5.0.2, 5.0.3, 5.0.4, 5.0.5)
ERROR: No matching distribution found for pysimplegui==4.55.1

causes it to terminate without installing everything (hence the further missing packages such as jsconschema etc. I earlier reported

foxBMS commented 3 months ago

You do not need to run this script. Run the command the provided in https://github.com/foxBMS/foxbms-2/issues/48#issuecomment-2178625454 to install all dependencies in the specific environment instead.

foxBMS commented 3 months ago

Dear @niktwo17,

there was a copy-paste error in https://github.com/foxBMS/foxbms-2/issues/48#issuecomment-2178625454 (We fixed that also in the comment).

Just to repeat it, the correct commands are:

foxBMS commented 3 months ago

Closing this in favor of #49.