Assertionerror: Egg-link .. Does Not Match Installed Location Of Reviewboard (at /...)
Solution 1:
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.
Solution 2:
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.
Solution 3:
You can silence the AssertionError
by running Python in optimized mode, -O
.
And we can run the pip module through Python too, -m
.
$ python -O -m pip uninstall <pkg-name>
Note: You may want to verify python -m pip
is the same as pip
. As sometimes the default Python and default pip can get out of sync.
$ pip -V
pip 20.3.1 from /usr/lib/python3.9/site-packages/pip (python 3.9)
$ python -m pip -V
pip 20.3.1 from /usr/lib/python3.9/site-packages/pip (python 3.9)
Solution 4:
If you're building your package with Python
import glob
import os
import sys
def 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.
Solution 5:
Just delete your .tox
folder. When you run tox
again a new .tox/ directory gets generated with the correct paths.
Post a Comment for "Assertionerror: Egg-link .. Does Not Match Installed Location Of Reviewboard (at /...)"