Giter VIP home page Giter VIP logo

Comments (2)

elarivie avatar elarivie commented on August 19, 2024

Hello @everhardt

I am not an expert of pipenv but I see two options

Option 1. Call "pipenv shell" which will adjust the environment variable to provide access to the python interpreter of the current virtual environment and then launch atom within that context.
You will then be able to configure linter-mypy by simply providing the interpreter name python

Option 2. Use a wrapper script like for example:

pipenv_python_wrapper.sh

Note: Put the wrapper file at the root of your project (next to the Pipfile).
You will then be able to configure linter-mypy by simply providing the interpreter $PROJECT_PATH/pipenv_python_wrapper.sh

Let me know if those options solve your issue.

from linter-mypy.

everhardt avatar everhardt commented on August 19, 2024

Thanks for your quick reply! I forgot to mention that I already start atom with pipenv run atom .. linter-mypy does give valid results, but fails to find imported modules: Cannot find module named 'xxx', which is why I assumed it didn't play nice with pipenv.

I did some debugging in the code of linter-mypy and noticed that I get those errors if I run the command executablePath + " " + params.join(" ") from / (as options.cwd stated). With that, it was easy to derive that I missed setting MYPYPATH manually on top of that. So in the end, I fixed this by:

  • launching atom from the command line with pipenv run atom . (I guess second suggestion would also work)
  • setting the MYPYPATH to $PROJECT_PATH

from linter-mypy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.