使用pip安装模块时提示: No module named pip
今天使用pip安装模块提示错误信息:
No module named pip
windows 解决方法:
>>> python -m ensurepip Ignoring indexes: https://pypi.python.org/simple Requirement already satisfied (use --upgrade to upgrade): setuptools in f:\dropbox\python\django\gistandard-master\venv\lib\site-packages\setuptools-28.8.0-py3.5.egg Collecting pip Installing collected packages: pip Successfully installed pip-8.1.1
升级pip版本:
>>> pip install --upgrade pip 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 8.1.1 Uninstalling pip-8.1.1: Successfully uninstalled pip-8.1.1 Successfully installed pip-18.0
linux解决方法:
python -m ensurepip
sudo easy_install pip