Pycharm升级pip

对于一个Python初学者,实在走了不少弯路,最近须要yong用Flask,Pycharm给我带来了不少便利,可是当我想要经过pycharm安装Flask-Bootstrap时,老是提醒以下错误:You are using pip version 10.0.1,however version 18.0 is available.python

依样画葫芦输入 python -m pip install --upgrade pip,获得以下结果3d

Collecting pip
  Using cached https://files.pythonhosted.org/packages/5f/25/e52d3f31441505a5f3af41213346e5b6c221c9e086a166f3703d2ddaf940/pip-18.0-py2.py3-none-any.whl
Installing collected packages: pip
  Found existing installation: pip 10.0.1
    Uninstalling pip-10.0.1:
      Successfully uninstalled pip-10.0.1
  Rolling back uninstall of pip
Exception:
Traceback (most recent call last):
  File "F:\PycharmProject\PythonBook\Code3_1\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\basecommand.py", line 228, in main
    status = self.run(options, args)
  File "F:\PycharmProject\PythonBook\Code3_1\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\commands\install.py", line 335, in run
    use_user_site=options.use_user_site,
  File "F:\PycharmProject\PythonBook\Code3_1\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\req\__init__.py", line 49, in install_given_reqs
    **kwargs
  File "F:\PycharmProject\PythonBook\Code3_1\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\req\req_install.py", line 748, in install
    use_user_site=use_user_site, pycompile=pycompile,
  File "F:\PycharmProject\PythonBook\Code3_1\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\req\req_install.py", line 961, in move_wheel_files
    warn_script_location=warn_script_location,
  File "F:\PycharmProject\PythonBook\Code3_1\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_internal\wheel.py", line 431, in move_wheel_files
    generated.extend(maker.make(spec))
  File "F:\PycharmProject\PythonBook\Code3_1\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_vendor\distlib\scripts.py", line 403, in make
    self._make_script(entry, filenames, options=options)
  File "F:\PycharmProject\PythonBook\Code3_1\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_vendor\distlib\scripts.py", line 307, in _make_script
    self._write_script(scriptnames, shebang, script, filenames, ext)
  File "F:\PycharmProject\PythonBook\Code3_1\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_vendor\distlib\scripts.py", line 243, in _write_script
    launcher = self._get_launcher('t')
  File "F:\PycharmProject\PythonBook\Code3_1\venv\lib\site-packages\pip-10.0.1-py3.6.egg\pip\_vendor\distlib\scripts.py", line 382, in _get_launcher
    result = finder(distlib_package).find(name).bytes
AttributeError: 'NoneType' object has no attribute 'bytes'
就这样失败了!一阵搜索,有网友提示解释器配置那试试。即以下图:blog

神奇的pip已是18.0版了,但仍是不能用。经过刚才的报错ip

咱们可以知道pip10所在路径,找到它,而后hen狠心地删掉它。把刚才升级起来的18.0也删掉。get

设置以下图,已不见pip的踪迹。pycharm

提示,packaging tools not found,点击后面的install packaging tools进行安装,安装完成后再次出现pip。it

再次运行>python -m pip install --upgrade pip,即可完成pip升级。pip