目录
解决问题
1. Traceback (most recent call last): 2. File "E:\ProgramData\Anaconda3\Scripts\pip-script.py", line 6, in <module> 3. from pip._internal.cli.main import main 4. File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\cli\main.py", line 8, in <module> 5. from pip._internal.cli.autocompletion import autocomplete 6. File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\cli\autocompletion.py", line 9, in <module> 7. from pip._internal.cli.main_parser import create_main_parser 8. File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\cli\main_parser.py", line 7, in <module> 9. from pip._internal.cli import cmdoptions 10. File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\cli\cmdoptions.py", line 22, in <module> 11. from pip._internal.cli.progress_bars import BAR_TYPES 12. File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\cli\progress_bars.py", line 9, in <module> 13. from pip._internal.utils.logging import get_indentation 14. File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\utils\logging.py", line 14, in <module> 15. from pip._internal.utils.misc import ensure_dir 16. File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\utils\misc.py", line 29, in <module> 17. from pip._internal.locations import get_major_minor_version, site_packages, user_site 18. File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\locations\__init__.py", line 14, in <module> 19. from . import _distutils, _sysconfig 20. File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\locations\_sysconfig.py", line 8, in <module> 21. from pip._internal.exceptions import InvalidSchemeCombination, UserInstallationInvalid 22. ImportError: cannot import name 'InvalidSchemeCombination' from 'pip._internal.exceptions' (E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\exceptions.py)
解决思路
导入错误:无法从“pip.\u internal.exceptions”(E:\ProgramData\Anaconda3\lib\site packages\pip\\u internal\exceptions.py)导入名称“invalidSchemeComposition”
解决方法
pip命令出现了问题,解决方法有两个
T1、重新安装pip
参考文章:
网络异常,图片无法展示
|
第一步,定位到pip命令所在的程序文件路径,删除该文件夹下的pip相关的文件夹
第二步,使用conda强制删除环境中pip
conda remove --force pip
第三步,使用conda重新安装pip
conda install -c anaconda pip
T2、改为conda下载对应的包
conda install pyserial