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

Mypy installs badly on OSX #5022

Closed
ns-cweber opened this issue May 12, 2018 · 7 comments
Closed

Mypy installs badly on OSX #5022

ns-cweber opened this issue May 12, 2018 · 7 comments

Comments

@ns-cweber
Copy link

I installed via pip3 install mypy --upgrade. No errors during install. I also tested inside of a pyenv.

  • Are you reporting a bug, or opening a feature request?

Bug

  • Please insert below the code you are checking with mypy,
    or a mock-up repro if the source is private. We would appreciate
    if you try to simplify your case to a minimal repro.
from typing import List
  • What is the actual behavior/output?
bug.py:1: error: No library stub file for standard library module 'typing'
bug.py:1: note: (Stub files are from https://github.com/python/typeshed)
bug.py:1: error: Cannot find 'builtins' module. Typeshed appears broken!
  • What is the behavior/output you expect?

No errors, or perhaps an unused import error or something?

  • What are the versions of mypy and Python you are using?
    Do you see the same issue after installing mypy from Git master?

mypy 0.600; python 3.6.4; not sure how to check git master

  • What are the mypy flags you are using? (For example --strict-optional)

No additional flags

@gvanrossum
Copy link
Member

How's your Python 3.6.4 installed? Homebrew perhaps? (If so, try upgrading it via Homebrew.)

@ns-cweber
Copy link
Author

Python 3.6.4 is installed via pyenv. I also tried with 3.6.2 installed via homebrew.

@gvanrossum
Copy link
Member

We can't repro this and we don't know enough about your environment to figure out what's gone wrong. You're going to have to debug this on your own, starting with the code that leads up to the first error.

@jgirardet
Copy link

maybe I have the same problem.
Running in a pyenv virtualenv with virtualenv activated. mypy is installed inside virtualenv.
python 3.6.5

At root repo I have a mapistar directory which own my package.
doing mypy mapistar :
I get error: Cannot find module named <any module> for all my imports. But There are installed inside the virtualenv.
All the tests are passing.

@emmatyping
Copy link
Collaborator

emmatyping commented May 29, 2018

@jgirardet I think the issue you are having is different, the modules you are importing don't come from packages that have type annotations, so mypy doesn't look in them. You may want to read https://mypy.readthedocs.io/en/latest/installed_packages.html for more, and consider using --ignore-missing-imports.

@jgirardet
Copy link

sorry I did not undertood it was the expected behaviour
thanks

@emmatyping
Copy link
Collaborator

I'm going to go ahead and close this, since we were unable to reproduce this. If someone has steps to reproduce, please feel free to open a new issue.

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

4 participants