Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] Don't hardcode python version/path #156

Closed
theseankelly opened this issue May 7, 2020 · 2 comments · Fixed by #159
Closed

[Windows] Don't hardcode python version/path #156

theseankelly opened this issue May 7, 2020 · 2 comments · Fixed by #159
Labels
bug Something isn't working

Comments

@theseankelly
Copy link

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
Copy link
Contributor

rotu commented May 8, 2020

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
Copy link
Author

@rotu yup that's the same error I saw -- sorry; should have included that in the bug report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants