-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Vim plugin unable to install black on certain machines #672
Comments
Hi, I have a similar issue (on Ubuntu). Black works fine in VScode and within virtualenv. Adding black to Vim via Plug or manually. I can't seem to get it working
opening a *.py file
opening black.vim file
|
For me issue was fixed after Python3.7 was installed as system python3 interpreter. |
I have a workaround that I hope will help anyone else with this error. Firstly, I am using a similar setup as @joaqo:
I use Vundle, so my .vimrc has
So I did exactly what the output recommended:
This fixed the |
In adition to the super useful comment of @ronalabraham Then inside the Seems that if you only I'm not sure if this is a bug, it seems not, but it wasn't clear for me that I should be the one setting the venv, maybe worth some mention about this in the documentation. |
Any activities on this issue recently? I'm using Vim |
@rollschild try to remove the directory that |
This is usually caused by Python and/or Vim upgrading under you while an old virtualenv is still around. The plugin should gracefully say that the virtualenv is unusable. I'd accept a PR to this effect. We have other priorities at the moment. |
OK, the simplist fix I've seen on a mac for this is to reinstall black with
Which causes a new environment to get downloaded. You could also try |
Closing as a duplicate of #2547 |
Operating system: Ubuntu 18.04
Python version: 3.6.6
Black version: whichever version the vim plugin is trying and failing to install
Does also happen on master: see above
Hey, I installed and used the vim black plugin perfectly fine on macOS, but when I tried it in ubuntu I ran into some problems.
During installation with vim-plug i get the following error:
No module named 'black'
. Not sure why this is, I did the same exact thing I was doing in macOS, and I am not in any virtualenv or anything weird. The ubuntu machine has python2.7 (under python) and python3.6.6 (under python3) installed. No idea why this could be happening. After this failed installation, each time i try to open vim I get the same error message. Tried installing several times, always get the same error.Thanks for the awesome project btw!
Edit: The only way I can start vim without getting the error message is if I run it in a virtualenv that has black installed, after this black runs fine. But if I dont do this I get the error mistake.
The text was updated successfully, but these errors were encountered: