AssertionError: Egg-link .. does not match installed location of ReviewBoard (at /...) AssertionError: Egg-link .. does not match installed location of ReviewBoard (at /...) python python

AssertionError: Egg-link .. does not match installed location of ReviewBoard (at /...)


If you are using Python3.5 on Ubuntu:

rm ~/.local/lib/python3.5/site-packages/[Package name].egg-link

where [Package name] is the package that causes issues.


This problem happens if you move the source code directory after the egg-link file is created.

You can edit the proper egg-link file, /home/daniel/envs/reviewboard-3.0/local/lib/python2.7/site-packages/ReviewBoard.egg-link, replacing the line /home/daniel/other-rb/reviewboard with /home/daniel/reviewboard and retry.


If you're building your package with Python

import globimport osimport sysdef get_egg_file(module_name):    def f(packages):        return glob.glob(            os.path.join(os.path.dirname(os.path.dirname(sys.executable)),                         'lib', 'python*', packages, module_name + '.egg-link'))    return f('site-packages') or f('dist-packages')egg_file = get_egg_file('YOUR_PACKAGE_NAME')if egg_file:    os.remove(egg_file[0])

Note that this should be executed in the target virtualenv or system python environment for sys.executable to resolve to what you want.