Python No module named pkg_resources
好记性不如烂笔头。
I encountered the same ImportError today while trying to use pip. Somehow the setuptools package had been deleted in my Python environment.
To fix the issue, run the setup script for setuptools:
wget https://bootstrap.pypa.io/ez_setup.py -O - | python
(or if you don't have wget installed (e.g. OS X), try
curl https://bootstrap.pypa.io/ez_setup.py | python
possibly with sudo prepended.)
If you have any version of distribute, or any setuptools below 0.6, you will have to uninstall it first.*
See Installation Instructions for further details.
* If you already have a working distribute, upgrading it to the "compatibility wrapper" that switches you over to setuptools is easier. But if things are already broken, don't try that.
Try these:
# Get rid of themreferer:
$ python -m pip uninstall -y setuptools
$ python -m pip uninstall -y distribute
# the next command should FAIL now because the above should be uninstalled
$ python -c "import pkg_resources"
# reinstall stuff now
$ python -m pip install -U --force-reinstall setuptools
$ python -m pip install -U --force-reinstall pip
# now check things work and are the same
$ python -m pip --version
$ pip --version
$ pip list
http://bird.so/search?q=No%20module%20named%20pkg_resources
https://github.com/pypa/pip/issues/1800
Python No module named pkg_resources的更多相关文章
- 解决:No module named pkg_resources
今天在装bleach的时候,发现bleach依赖的其中的一个库是html5lib,从pypi下载源码包,执行python setup.py install,报错了: 提示我的setuptools版本过 ...
- No module named 'pkg_resources' 解决方法
不知什么原因pip3突然不好使了....下午apt-get install && pip3 install 了好多东西,具体什么原因也找不出个所以然. 执行pip3报错: Traceb ...
- 【mlflow】执行import mlflow 报错:ImportError: No module named 'pkg_resources'
命令行运行 python -c “import mlflow” 的时候报错: ImportError: No module named 'pkg_resources' 结果发现是因为本地有一个文件夹叫 ...
- pip提示ModuleNotFoundError: No module named 'pkg_resources'
卸载setuptools后,pip下载python包一直提示ModuleNotFoundError: No module named 'pkg_resources',如下图: 在网上找了很多贴了都无法 ...
- python no module named _socket 原因
python no module named _socket 原因 Lib/site-packages 不在 sys.path 中
- Python “No module named” 以及在Python2中可以导入,但在python3中却出现的原因
Python “No module named” 以及在Python2中可以导入,但在python3中却出现的原因 原因之1: 例如有这样的一个包和它的模块: Test __init__.py Mod ...
- 问题1-/usr/bin/python: No module named virtualenvwrapper
操作系统:Ubuntu 问题:创建虚拟环境时,出现:/usr/bin/python: No module named virtualenvwrapper 解决方法: 1.切换到用户家目录 2.打开隐藏 ...
- 利用virtualenvwrapper创建虚拟环境出现错误“/usr/bin/python: No module named virtualenvwrapper”
Linux:CentOS7 python: 系统默认python版本2.7,利用python启动 自己安装python版本3.8,利用python3启动 问题描述: 在上述环境中利用virtualen ...
- [python] No module named _sysconfigdata_nd
when setting python environment in Ubuntu13.04, i got this error: ImportError: No module named _sysc ...
随机推荐
- EntityFramework 学习 一 Colored Entity in Entity Framework 5.0
You can change the color of an entity in the designer so that it would be easy to see related groups ...
- python-字符串应用
例1:用python程序将DNA的一条链翻译出来s1=’ATTACGGC‘ rule={'A':'T','T':'A','C':'G','G':'C'} s1='ATTACGGC' s2=[rule[ ...
- 免配置环境变量使用Tomcat+设置项目主页路径为http://localhost:8080+修改tomcat端口号
一.免配置jdk JAVA_HOME和tomcat CATALINA_HOME环境变量使用tomcat 众说周知,使用tomcat需要有java环境,一般情况下需要配置jdk和tomcat的路径到w ...
- Git--之本地仓库
VCS的历史 : Git是一款代码管理工具(Version Control System),傲视群雄,是目前世界上最先进的免费开源的分布式版本控制系统,没有之一! VCS版本控制系统(version ...
- codeforces 798C.Mike and gcd problem 解题报告
题目意思:给出一个n个数的序列:a1,a2,...,an (n的范围[2,100000],ax的范围[1,1e9] ) 现在需要对序列a进行若干变换,来构造一个beautiful的序列: b1,b2, ...
- ES6-Set和Map数据结构学习笔记
Set和Map数据结构 Set 基本用法 ES6提供了新的数据结构--Set,类似于数组,但是成员的值是唯一的,没有重复的值,Set本身是一种构造函数,用来生成Set数据结构 var s = new ...
- ipconfig | find /i "ipv4"
C:\Users\Bob>ipconfig|find /i "IPv" 本地链接 IPv6 地址. . . . . . . . : fe80::d495:6e3:6368 ...
- ural 2018 The Debut Album(dp¥)
2018. The Debut Album Time limit: 2.0 secondMemory limit: 64 MB Pop-group “Pink elephant” entered on ...
- uva1583(暴力枚举或打表)
紫书上的代码是打表. 我的做法是暴力枚举.注意,有多个变量时,选择枚举哪一个变量会影响到时间效率,值得考虑.由于各位数字之和最大就是五个9的和为45,所以就枚举各位数字之和比较快. #include& ...
- MySQL 添加、查看字段注释
语法: 创建表时的COMMENT内容,要查看这些内容,使用命令: show full fields from '表名称'; 查看tb_usr表字段注释: 创建新表的脚本中, 可在字段定义脚本中添加co ...