为python安装Django模块时出错

时间:2019-06-13 09:23:00

标签: python

我一直在尝试安装django,在Internet上四处张望,但找不到可能的解决方案。

我尝试寻找解决方案。一些解决方案告诉我为pip安装冲突检查器,但仍然无法正常工作,因为似乎没有使用'pip'关键字安装任何东西。当我尝试找出我的点子版本时,甚至给我一个错误

python -m pip install django



PS C:\Users\Fahad> python -m pip install django
Traceback (most recent call last):
  File "C:\Users\Fahad\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\Fahad\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Fahad\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\__main__.py", line 16, in <module>
    from pip._internal import main as _main  # isort:skip # noqa
  File "C:\Users\Fahad\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\__init__.py", line 19, in
    from pip._vendor.urllib3.exceptions import DependencyWarning
ModuleNotFoundError: No module named 'pip._vendor.urllib3



PS C:\Users\Fahad> python -m pip --version
Traceback (most recent call last):
  File "C:\Users\Fahad\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\Fahad\AppData\Local\Programs\Python\Python37\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Fahad\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\__main__.py", line 16, in <module>
    from pip._internal import main as _main  # isort:skip # noqa
  File "C:\Users\Fahad\AppData\Local\Programs\Python\Python37\lib\site-packages\pip\_internal\__init__.py", line 19, in <module>
    from pip._vendor.urllib3.exceptions import DependencyWarning
ModuleNotFoundError: No module named 'pip._vendor.urllib3'

1 个答案:

答案 0 :(得分:0)

因此,我尝试从here下载get-pip.py,当我执行python get-pip.py时,我尝试重新安装django并成功。