-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
__builtins__ and int are not defined #3867
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
Comments
Hi! This is usually a problem related to a broken installation. Could you paste (perhaps in a gist?) the output of calling mypy with the verbose flag |
I'd guess that the 'lib64' in the path might have confused mypy in its
search to find typeshed. I recall some recent fix for that, but I don't
recall whether it made it into mypy 0.521.
…On Thu, Aug 24, 2017 at 1:42 AM, Ethan Smith ***@***.***> wrote:
Hi! This is usually a problem related to a broken installation. Could you
paste (perhaps in a gist?) the output of calling mypy with the verbose flag
-v (this should help us debug the issue). This will tell us where mypy is
looking for typeshed, which it likely did not find correctly.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3867 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACwrMiqc9HkWn4bWJyW_CnjvNgkitaChks5sbTdhgaJpZM4PBBgr>
.
--
--Guido van Rossum (python.org/~guido)
|
Here is the output of "mypy -v --show-traceback foo.py" |
Can you try with the the latest master?
…On Aug 24, 2017 8:28 AM, "diamond-lizard" ***@***.***> wrote:
Here
<https://gist.github.com/diamond-lizard/a343dfcaf5c79750fe1e469392924d37>
is the output of "mypy -v --show-traceback foo.py"
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3867 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ACwrMknLGlyVILrgYT8BenURBu5yIt0cks5sbZangaJpZM4PBBgr>
.
|
Apologies for the ignorant question, but how would I install the latest master? I tried "pip3 install --user --upgrade mypy" and got:
... and then got the same error when I ran mypy against foo.py |
Nevermind. I figured it out:
And now
Thanks for your help! |
#3758 fixed this, it seems it was merged right around 0.521, and probably was missed. |
@gvanrossum @ethanhs |
Oh, the "install from source" section definitely needs to be fixed. But "try from master" is more easily done through a GitHub URL:
It's probably a good idea to add a hint about trying that first if you think you've found a bug -- it's a common occurrence. |
) Update the installation from source instructions to also copy typeshed (see #3867). Also minor formatting improvements.
When I run mypy against this test program ("foo.py"):
I get this error:
I'm using python 3.4.5 under gentoo linux amd64. I had installed mypy using "pip3 install --user mypy" and my version of pip3 is "pip 9.0.1 from /usr/lib64/python3.4/site-packages (python 3.4)".
This was from a fresh install of mypy, but I then tried "pip3 install --user --upgrade mypy" which installed typing-3.6.2 but I still got the same error.
The text was updated successfully, but these errors were encountered: