Jedi stopped working after upgrading Linux

Error Message

Running: pip install --upgrade /home/****/.emacs.d/elpa/jedi-core-20191011.1750/...Done
deferred error : (error "Deferred process exited abnormally:
command: /home/****/.emacs.d/.python-environments/default/bin/pip
exit status: exit 1
event: exited abnormally with code 1
buffer contents: \"Traceback (most recent call last):
File \\\"/home/****/.emacs.d/.python-environments/default/bin/pip\\\", line 7, in <module>
from pip import main
File \\\"/home/****/.emacs.d/.python-environments/default/local/lib/python2.7/site-packages/pip/__init__.py\\\", line 72, in <module>
from pip.log import logger
File \\\"/home/****/.emacs.d/.python-environments/default/local/lib/python2.7/site-packages/pip/log.py\\\", line 6, in <module>
import logging
File \\\"/usr/lib/python2.7/logging/__init__.py\\\", line 26, in <module>
import sys, os, time, cStringIO, traceback, warnings, weakref, collections
File \\\"/usr/lib/python2.7/weakref.py\\\", line 14, in <module>
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
\"")

Solution

sudo apt install virtualenv
virtualenv --system-site-packages /home/[USER]/.emacs.d/.python-environments/default
--system-site-packages
Give access to the global site-packages modules to the virtual environment.

 by the author.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store