赞
踩
成功解决ImportError: cannot import name 'InvalidSchemeCombination' from 'pip._internal.exceptions'
目录
- Traceback (most recent call last):
- File "E:\ProgramData\Anaconda3\Scripts\pip-script.py", line 6, in <module>
- from pip._internal.cli.main import main
- File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\cli\main.py", line 8, in <module>
- from pip._internal.cli.autocompletion import autocomplete
- File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\cli\autocompletion.py", line 9, in <module>
- from pip._internal.cli.main_parser import create_main_parser
- File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\cli\main_parser.py", line 7, in <module>
- from pip._internal.cli import cmdoptions
- File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\cli\cmdoptions.py", line 22, in <module>
- from pip._internal.cli.progress_bars import BAR_TYPES
- File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\cli\progress_bars.py", line 9, in <module>
- from pip._internal.utils.logging import get_indentation
- File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\utils\logging.py", line 14, in <module>
- from pip._internal.utils.misc import ensure_dir
- File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\utils\misc.py", line 29, in <module>
- from pip._internal.locations import get_major_minor_version, site_packages, user_site
- File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\locations\__init__.py", line 14, in <module>
- from . import _distutils, _sysconfig
- File "E:\ProgramData\Anaconda3\lib\site-packages\pip\_internal\locations\_sysconfig.py", line 8, in <module>
- from pip._internal.exceptions import InvalidSchemeCombination, UserInstallationInvalid
- 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命令出现了问题,解决方法有两个
第一步,定位到pip命令所在的程序文件路径,删除该文件夹下的pip相关的文件夹
第二步,使用conda强制删除环境中pip
conda remove --force pip
第三步,使用conda重新安装pip
conda install -c anaconda pip
conda install pyserial
哈哈,大功告成!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。