标签:version python2.7 eve 错误信息 nta 查看 2.7 安装 ror
docker中pip install or uninstall报错今天开发同学咨询了一个问题,他说在docker的一个运行容器中执行如下命令:
rm: cannot remove ‘smart_open-1.5.5-py2.7.egg-info/‘: Directory not empty
ls: cannot access PKG-INFO: No such file or directory
ls: cannot access SOURCES.txt: No such file or directory
ls: cannot access dependency_links.txt: No such file or directory
ls: cannot access installed-files.txt: No such file or directory
ls: cannot access requires.txt: No such file or directory
ls: cannot access top_level.txt: No such file or directory
?????????????? ? ? ? ? ? PKG-INFO
?????????????? ? ? ? ? ? SOURCES.txt
?????????????? ? ? ? ? ? dependency_links.txt
?????????????? ? ? ? ? ? installed-files.txt
?????????????? ? ? ? ? ? requires.txt
?????????????? ? ? ? ? ? top_level.txt
...
OSError: [Errno 39] Directory not empty: "/usr/lib/python2.7/site-packages/smart_open-1.5.5-py2.7.egg-info"
# docker info
Containers: 80
Running: 37
Paused: 0
Stopped: 43
Images: 1342
Server Version: 17.09.0-ce
Storage Driver: overlay
Backing Filesystem: extfs
Supports d_type: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 19
Server Version: 17.09.0-ce
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
比较以上信息,出现本次问题的原因可能是:该问题在docker的overlay存储驱动下可能出现该问题,原因可能是因为overlay存储层并非是完全的隔离,在容器层卸载相关包的时候会导致镜像层的内容无法进行写操作。
强制重新安装包
pip install [包名] --ignore-installed [包名]
docker中pip install/uninstall报错
标签:version python2.7 eve 错误信息 nta 查看 2.7 安装 ror
原文地址:http://blog.51cto.com/wutengfei/2161960