Replies: 1 comment 3 replies
-
I just made some progress. I installed pylint globally. It had the same problem as pylint installed using Mason. If I run pylint globally with the option --init-hook="import sys; sys.path.append('/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/site-packages')" which attaches the path to the site-packages to the sys.path. This then works. So I now need to work out how to attach this to my path in nvim. Any ideas? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello all! :)
I am a complete beginner with all of this, but I am having fun!
I was hoping you would be able to help me get pylint fully functional in nvim.
Env:
Mac OS Venture 13.1
nvim v0.8.1
pylint 2.15.9
python 3.11.1 (accessed through 'python3')
pip 22.3.1 (accessed through 'pip3')
Python and the packages are installed globally. I am using the latest versions of null-ls and Mason and the related libraries to tie all of this together.
My problem is that pylint does not recognise all the packages I have installed with pip3 or any of my own modules. My code executes as expected when I run it using python3, so the libraries are installed and the modules are loaded correctly. They include packages such as pandas and numpy. I have checked :Mason in nvim and it has access to the right python and pip executables.
I have been digging around trying to figure out what the problem might be. I asked in the null-ls discussion forum, and they said it might have something to do with how Mason links to the binaries and encouraged me to ask you guys here. Does that make any sense to you?
How do I check which paths pylint uses to search for packages to import? And how can I direct it to the right place?
I seem to be missing some fundamental piece of information to understand the problem.
Thank you all so much for the help and support! <3 And I look forward to continue my coding journey!
Beta Was this translation helpful? Give feedback.
All reactions