Operating system: Archlinux
Python version: 3.7.1
Black version: 18.9b0
I have followed the guide and I use vim-Plug I have successfully installed the plugin and it works just fine.
then I do workon mypersonalvenv and after that if I wanna open vim it says:
$ vim main.py
Error detected while processing /home/aran/.vim/plugged/black/plugin/black.vim:
line 124:
Traceback (most recent call last):
File "<string>", line 56, in <module>
ModuleNotFoundError: No module named 'black'
Press ENTER or type command to continue
when I press enter and then run :Black I get:
Traceback (most recent call last):
File "", line 1, in
NameError: name 'Black' is not defined
when I run :PlugInstall it says:
- black: Already installed
Also vim has created these files:
/home/aran/.vim/black
โโโ bin
โย ย โโโ activate
โย ย โโโ activate.csh
โย ย โโโ activate.fish
โย ย โโโ python
โย ย โโโ python3
โโโ include
โโโ lib
โย ย โโโ python3.7
โย ย โโโ site-packages
โโโ lib64 -> lib
โโโ pyvenv.cfg
6 directories, 6 files
The problem was that I was already inside my personal environment when I ran :PlugInstall now I removed ~/.vim/black and deactivaded my venv and opened vim again(automatically installs black) and then did workon mypersonalvenv and it works just fine now.
Most helpful comment
The problem was that I was already inside my personal environment when I ran :PlugInstall now I removed ~/.vim/black and deactivaded my venv and opened vim again(automatically installs black) and then did workon mypersonalvenv and it works just fine now.