[Windows] Don't hardcode python version/path
Closed this issue · 2 comments
theseankelly commented
Description
On this line the path to python3.7 is hard coded to version 3.7.6.
The GitHub Windows runner was recently updated such that the default python version is now 3.7.7. This causes errors with the ROS setup step.
This can be worked around by using the actions/setup-python
action to configure Python 3.7.6 prior to running the ros-tooling/setup-ros
action as follows:
- uses: actions/setup-python@v2
with:
python-version: '3.7.6'
- uses: ros-tooling/setup-ros@0.0.20
But I think ideally the system python version/path ought to be queried instead of hardcoded -- not really sure.
rotu commented
I think I'm seeing this surface as a crash https://github.com/RoverRobotics-forks/rmw_cyclonedds/runs/654799692?check_suite_focus=true#step:4:4
Invoking "cmd /c mklink /d c:\python37 c:\hostedtoolcache\windows\Python\3.7.6\x64 "
C:\windows\system32\cmd.exe /c mklink /d c:\python37 c:\hostedtoolcache\windows\Python\3.7.6\x64
symbolic link created for c:\python37 <<===>> c:\hostedtoolcache\windows\Python\3.7.6\x64
...
C:\hostedtoolcache\windows\Python\3.7.7\x64\Scripts\pip3.exe install --upgrade argcomplete colcon-bash==0.4.2 colcon-cd==0.1.1 colcon-cmake==0.2.19 colcon-common-extensions==0.2.1 colcon-core==0.5.5 colcon-defaults==0.2.4 colcon-lcov-result==0.4.0 colcon-library-path==0.2.1 colcon-metadata==0.2.4 colcon-mixin==0.1.6 colcon-notification==0.2.12 colcon-output==0.2.8 colcon-package-information==0.3.2 colcon-package-selection==0.2.5 colcon-parallel-executor==0.2.4 colcon-pkg-config==0.1.0 colcon-powershell==0.3.6 colcon-python-setup-py==0.2.5 colcon-recursive-crawl==0.2.1 colcon-ros==0.3.17 colcon-test-result==0.3.8 coverage cryptography empy flake8 flake8-blind-except flake8-builtins flake8-class-newline flake8-comprehensions flake8-deprecated flake8-docstrings flake8-import-order flake8-quotes ifcfg lark-parser mock mypy nose numpy pep8 pydocstyle pyparsing pytest pytest-cov pytest-mock pytest-repeat pytest-rerunfailures pytest-runner setuptools wheel
Fatal Python error: initfsencoding: unable to load the file system codec
ModuleNotFoundError: No module named 'encodings'
Current thread 0x000017cc (most recent call first):
##[error]The process 'C:\hostedtoolcache\windows\Python\3.7.7\x64\Scripts\pip3.exe' failed with exit code 3221226505
theseankelly commented
@rotu yup that's the same error I saw -- sorry; should have included that in the bug report