Module not found on a virtualenv

69 views
Skip to first unread message

rjsilvestre

unread,
May 11, 2018, 12:19:59 AM5/11/18
to powerline
Hi, I installed powerline on fedora 27 using the official repository packages. Installed powerline as the base package and vim-powerline which uses powerline.vim file to start powerline on vim.
I am currently learning python and using virtualenvs for each project I work on.
All was working well until I updated to fedora 28. After the update powerline still loads fine on vim while not activating a virtualenv. After activating one, I get an module "powerline" not found error when starting vim. It seems to try to find powerline on the virtualenv modules folder.
I was able to find a workaround by adding the line on .vimrc:
python3 sys.path.append('/usr/lib/python3.6/site-packages/')

To add system folder of python modules to sys.path
Besides that line I only have those on .vimrc:
set laststatus=2
set showtabline=2
set noshowmode
set t_Co=256

I also tried to uninstall the vim-powerline package and use this code to load powerline:
python3 from powerline.vim import setup as powerline_setup
python3 powerline_setup
()
python3
del powerline_setup

The result is the same, it stops working when activating a virtualenv and give a module not found error.
I just don't understand what happened after the update. Is specifically from the distro package or am I missing some configuration on .vimrc?

Thanks in advance!

William Starrs

unread,
Aug 7, 2018, 10:14:18 PM8/7/18
to powerline
Hello,

Same issue on ArchLinux.  Recent updates to python3.7 seem to have broken my ability to use python virtual environments via virtualenv.  I used to be able to enter a virtualenv in bash without complaint. Now if I have powerline referenced in my .bashrc using the newly recommended powerline-daemon -q, setting the 2 POWERLINE_BASH variables, and executing the /usr/powerline/... powerline.sh binding, an error is thrown in the terminal because the powerline module is not installed, and this results in an endless loop.  I need to kill the process and disable powerline to be able to use the virtual environment.

Thanks for any assistance,

Bill
Reply all
Reply to author
Forward
0 new messages