CMake PythonLibs picking up wrong version
See original GitHub issueDescribe the bug
When
- uses: actions/setup-python@v2
with:
python-version: 3.8.x
architecture: x64
CMake seems to get the correct PythonInterp but the wrong PythonLibs. I wanted version 3.8.7 for both.
– Found PythonLibs: C:/hostedtoolcache/windows/Python/3.9.1/x64/libs/python39.lib (found suitable version “3.9.1”, minimum required is “3.0”) – Found PythonInterp: C:/hostedtoolcache/windows/Python/3.8.7/x64/python.exe (found suitable version “3.8.7”, minimum required is “3.0”)
Which version of the action are you using?
-
v1
-
v2
- Some other tag (such as
v2.0.1
ormaster
)
Environment
- self-hosted
- Linux
- Windows
- Mac
If applicable, please specify if you’re using a container
Python Versions
Please list all of the effected versions of Python (3.8.2
, etc.)
3.8 and 3.9
To Reproduce Steps to reproduce the behavior:
- Go to ‘…’
- Click on ‘…’
- Scroll down to ‘…’
- See error
Run/Repo Url If applicable, and if your repo/run is public, please include a URL so it is easier for us to investigate.
Screenshots If applicable, add screenshots to help explain your problem.
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
@nikita-bykov, thank you so much for your help! Very appreciated.
To be clear: I am using MSYS2 shell. I solved my problem by manually adding the python executable to PATH:
After that CMake finds the right one. This might not be relevant to the OP’s problem but might be helpful for others having the same issue.