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

pyre from PyPI can't find its typeshed directory #815

Open
wojdyr opened this issue Jan 12, 2024 · 1 comment
Open

pyre from PyPI can't find its typeshed directory #815

wojdyr opened this issue Jan 12, 2024 · 1 comment

Comments

@wojdyr
Copy link

wojdyr commented Jan 12, 2024

I installed pyre with pip install pyre-check on Linux.

pip show -f pyre-check shows:

Version: 0.9.19
Location: /home/wojdyr/.local/lib/python3.11/site-packages
Files:
  ../../../bin/pyre
  […]
  ../../pyre_check/typeshed/stdlib/__future__.pyi

So the typeshed is installed in /home/wojdyr/.local/lib/pyre_check/typeshed

Pyre works, but requires the user to manually specify the location:

$ pyre init
ƛ `import typeshed` failed.
ƛ Unable to locate typeshed, please enter its root:

Running it under strace, I see one relevant line:

newfstatat(AT_FDCWD, "/usr/lib/pyre_check/typeshed", 0x7ffd36707480, 0) = -1 ENOENT (No such file or directory)

It's may be not only me, there was a question on SO:
https://stackoverflow.com/questions/75901930/pyre-check-cannot-located-typeshed

@ebrahimsofi123
Copy link

When you run pyre init and it doesn't find the typeshed automatically, just give it the path where it's actually installed. In your case, type in:
/home/wojdyr/.local/lib/pyre_check/typeshed
Also, to avoid doing this every time, you can add the path to your project's .pyre_configuration file under the typeshed key. This way, Pyre will know where to look right from the start.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants