-
Notifications
You must be signed in to change notification settings - Fork 23
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
Different Python Paths for Local and Github Actions #203
Comments
I don't know if this helps, or if it's anywhere close to intended usage, but I was struggling with a similar issue (wanting different
|
Dup #214 |
@jobh Thank you for sharing the above entry bash example, that works for me and saved my time! |
Hi @jobh Thanks for the tips, and I wondering why use $ which python
/home/xiang/git/test/.venv/bin/python
$ python
Python 3.12.3 (main, Sep 11 2024, 14:17:37) [GCC 13.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import os, sys
>>> sys.executable
'/home/xiang/git/test/.venv/bin/python'
>>> os.path.realpath(sys.executable)
'/usr/bin/python3.12'
>>> |
I don't remember why exactly, it may well be unnecessary. |
Hi everybody,
My
.pre-commit-config.yaml
looks like this:and this all works fine as long as I execute it locally. As soon as I push it to Github, and Github Actions kicks in,, it does no longer work because pyright cannot find any of the installed packages (=for every single import statement there is a
reportMissingImports
error thrown). So I thought I change the config file to this:This would work on Github, but does no longer work locally.
I was looking through the documentation and could not find a mention of the
--pythonpath
argument.How can I specify the pythonpath such that pyright works both locally and on Github?
The text was updated successfully, but these errors were encountered: