Open copdips opened 11 months ago
@RobertCraigie
could you please have a look at this issue, it bothers me for a long time, I'm sure pyright is installed, it is installed by simply pip install pyright --force-reinstall -v
without venv as I'm in a CICD, the install log is like follows:
Collecting pyright
Using cached https://pkgs.dev.azure.com/xxx/_packaging/daa86ee5-06b8-417b-bc88-e64e3e2eef29/pypi/download/pyright/1.1.332/pyright-1.1.332-py3-none-any.whl (17 kB)
Collecting nodeenv>=1.6.0 (from pyright)
Downloading https://pkgs.dev.azure.com/xxx/_packaging/daa86ee5-06b8-417b-bc88-e64e3e2eef29/pypi/download/nodeenv/1.8/nodeenv-1.8.0-py2.py3-none-any.whl (22 kB)
Collecting setuptools (from nodeenv>=1.6.0->pyright)
Using cached https://pkgs.dev.azure.com/xxx/_packaging/daa86ee5-06b8-417b-bc88-e64e3e2eef29/pypi/download/setuptools/68.2.2/setuptools-68.2.2-py3-none-any.whl (807 kB)
Installing collected packages: setuptools, nodeenv, pyright
Attempting uninstall: setuptools
Found existing installation: setuptools 65.5.0
Uninstalling setuptools-65.5.0:
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/_distutils_hack/
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/distutils-precedence.pth
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pkg_resources/
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/setuptools-65.5.0.dist-info/
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/setuptools/
Successfully uninstalled setuptools-65.5.0
Attempting uninstall: nodeenv
Found existing installation: nodeenv 1.8.0
Uninstalling nodeenv-1.8.0:
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/bin/nodeenv
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/__pycache__/nodeenv.cpython-310.pyc
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/nodeenv-1.8.0.dist-info/
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/nodeenv.py
Successfully uninstalled nodeenv-1.8.0
changing mode of /opt/hostedtoolcache/Python/3.10.13/x64/bin/nodeenv to 777
Attempting uninstall: pyright
Found existing installation: pyright 1.1.332
Uninstalling pyright-1.1.332:
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/bin/pyright
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/bin/pyright-langserver
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/bin/pyright-python
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/bin/pyright-python-langserver
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyright-1.1.332.dist-info/
Removing file or directory /opt/hostedtoolcache/Python/3.10.13/x64/lib/python3.10/site-packages/pyright/
Successfully uninstalled pyright-1.1.332
changing mode of /opt/hostedtoolcache/Python/3.10.13/x64/bin/pyright to 777
changing mode of /opt/hostedtoolcache/Python/3.10.13/x64/bin/pyright-langserver to 777
changing mode of /opt/hostedtoolcache/Python/3.10.13/x64/bin/pyright-python to 777
changing mode of /opt/hostedtoolcache/Python/3.10.13/x64/bin/pyright-python-langserver to 777
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
Successfully installed nodeenv-1.8.0 pyright-1.1.332 setuptools-68.2.2
for those github action runs who worked, where pyright tried to find the equivalent of /home/runner/.cache/pyright-python
? As I ran ls /home/runner/.cache
before, and it showed only a pip
folder inside.
Hi, are you still being troubled by this issue? You seemed to have mentioned this issue #190 before.
I solved this issue by #200, it might be useful to you.
@WSH032 Thank you for your notice, I tested multiple times, but I can not say it works or not, as I explained from the beginning that the issue is aleatory, and currently, with or without your workaround, both are working for the moment...
I will keep tracking this workaround and give feedback here.
Hello,
I'm running pyright in github action running on ubuntu-latest with python-version: 3.10.13, I got error when running pyright. I did not get the error in every github action workflow run, sometimes OK and sometimes KO.
I installed pyright inside github action by
pip install pyright
without venv.pip list shows the version of pyright installed:
my pre-commit yaml file:
The error when running pre-commit in github action
checking the content of
/home/runner/.cache
folder (where$HOME
is/home/runner
), there's only a pip folder, butpip list
shows that pyright is installed.The strange thing is that
home/runner/.cache/
folder has always only thepip
sub folder, never haspright-python
sub folder, but pyright during CICD sometimes works, and sometimes not.hereunder the env vars during CICD:
do we have a way to show some debug logs to see how pyright interacts with
/home/runner/.cache
folder duringpip install pyright
?