You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As mentioned in the title the build fails on a fresh platformio install (trough vscode). I did not save the error message, but the problem was with importing distutils.
The python 12 release notes state:
gh-95299: Do not pre-install setuptools in virtual environments created with venv. This means that distutils, setuptools, pkg_resources, and easy_install will no longer available by default; to access these run pip install setuptools in the activated virtual environment.
I did not include a PR together with this issue yet, as the migration advice as listed under https://peps.python.org/pep-0632/#migration-advice states that for some used modules/types from distutils other modules than setuptools are preferable and I do not have the code insight into this project to judge that.
I did only try building zephyr projects, so maybe this issue belongs to them - again I have not enough insight to judge that.
When I have more time I will try to reproduce the issue again.
The text was updated successfully, but these errors were encountered:
Error occurs in zephyr framework script, I will therefore close this issue. The problem was that the board I used is not supported by more recent zephyr versions.
Error message:
Traceback (most recent call last):
File "/home/basti/.platformio/packages/framework-zephyr/scripts/gen_handles.py", line 34, in <module>
from distutils.version import LooseVersion
ModuleNotFoundError: No module named 'distutils'```
Uh oh!
There was an error while loading. Please reload this page.
As mentioned in the title the build fails on a fresh platformio install (trough vscode). I did not save the error message, but the problem was with importing distutils.
The python 12 release notes state:
Following https://stackoverflow.com/questions/69919970/no-module-named-distutils-util-but-distutils-is-installed I manually added setuptools to the virtual environment which fixed the problem.
I think the solution therefore would probably be to add setuptools accordingly as a dependency in https://github.com/platformio/platformio-core/blob/develop/platformio/dependencies.py for python versions >=12.
I did not include a PR together with this issue yet, as the migration advice as listed under https://peps.python.org/pep-0632/#migration-advice states that for some used modules/types from distutils other modules than setuptools are preferable and I do not have the code insight into this project to judge that.
I did only try building zephyr projects, so maybe this issue belongs to them - again I have not enough insight to judge that.
When I have more time I will try to reproduce the issue again.
The text was updated successfully, but these errors were encountered: