How to use pylint within a virtualenv? neovim + ale + pylint #4463
Unanswered
landonstewart
asked this question in
Q&A - Ask for help with problems
Replies: 1 comment
-
This is actually an issue with The only way I know of to get |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I'm hoping to use
ale
+pylint
within a virtual environment without having to installpylint
into every virtualenv I'm working in at the time. When I useimport <something>
that's only installed within the virtualenv it can't find it becauseale
(orpylint
) is not using the virtual environment that neovim's:CheckHealth
reports. For example while editing a new python script within a virtualenv wheregunicorn
is installed I seeimport-error: Unable to import 'gunicorn'
.g:python3_host_prog
is set to"/opt/homebrew/bin/python3"
pylint
is installed in the system environmentneovim
is installed in the system environmentI've tried setting
g:ale_python_auto_virtualenv
to1
but this has no effect.I've tried setting
g:ale_virtualenv_dir_names
to'[]'
but this has no effect.The problem I'm having seems similar to #1777 but my issue is much simpler than that. I just want to not have to install pylint inside every virtualenv I'm coding within.
Perhaps there's an argument for pylint I'm missing that will tell it to use the virtualenv I'm working in? I read the massive number of lines from
pylint --help
and didn't see anything applicable in there.Before entering virtual environment:
After entering virtual environment (neither of the above are installed - this is on purpose):
neovim config:
ALEInfo:
CheckHealth:
Beta Was this translation helpful? Give feedback.
All reactions