This repository has been archived by the owner on Aug 10, 2021. It is now read-only.
[Bugfix] When execute the script "pip-diff", occur Error "ImportError: No module named 'pip.index'". #18
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
======[Basic Info]======
=[Bug Info]=:
When execute the script "pip-diff", occur Error "ImportError: No module named 'pip.index'".
=[Bugfix Solution]=:
This question is caused by the new version of "pip"(>10.0) modifying the directory structure. and there is a dir named "_internal". So add a logical code to solve it.
======[Bugfix Test Result]======
=[Bug Running Log as following]=
F:\0Devin_2018\CodeProject\Python\PursuitSmallCode\venv\Scripts\python.exe "F:\Program Files\PyCharm Community Edition 2018.1.4\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 50787 --file F:/0Devin_2018/CodeProject/Python/pip-pop/bin/pip-diff --stale ..\tests\test-requirements.txt ..\tests\test-requirements2.txt
pydev debugger: process 5032 is connecting
Connected to pydev debugger (build 181.5087.37)
Traceback (most recent call last):
File "F:\Program Files\PyCharm Community Edition 2018.1.4\helpers\pydev\pydevd.py", line 1664, in
main()
File "F:\Program Files\PyCharm Community Edition 2018.1.4\helpers\pydev\pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "F:\Program Files\PyCharm Community Edition 2018.1.4\helpers\pydev\pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "F:\Program Files\PyCharm Community Edition 2018.1.4\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "F:/0Devin_2018/CodeProject/Python/pip-pop/bin/pip-diff", line 23, in
from pip.req import parse_requirements
ImportError: No module named 'pip.req'
=[Bugfix Running Result as following]=
F:\0Devin_2018\CodeProject\Python\PursuitSmallCode\venv\Scripts\python.exe "F:\Program Files\PyCharm Community Edition 2018.1.4\helpers\pydev\pydevd.py" --multiproc --qt-support=auto --client 127.0.0.1 --port 50780 --file F:/0Devin_2018/CodeProject/Python/pip-pop/bin/pip-diff --stale ..\tests\test-requirements.txt ..\tests\test-requirements2.txt
pydev debugger: process 5576 is connecting
Connected to pydev debugger (build 181.5087.37)
cffi
django
Process finished with exit code 0
Signed-off-by: Devin [email protected]