我正在尝试关注以下项目:https://github.com/MasazI/cnn_depth_tensorflow
问题是我没有h5py。所以我要点安装h5py。然后我得到这个:
Traceback (most recent call last):
File "convert_mat_to_img.py", line 4, in <module>
import h5py
ImportError: No module named h5py
MBP-R-006:cnn_depth_tensorflow-master admin2$ pip install h5py
Traceback (most recent call last):
File "/usr/local/bin/pip", line 11, in <module>
load_entry_point('pip==10.0.1', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2691, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2322, in load
return self.resolve()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2328, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python2.7/site-packages/pip/_internal/__init__.py", line 5, in <module>
import logging
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 626, in <module>
_handlers = weakref.WeakValueDictionary() #map of handler names to handlers
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 55, in __init__
def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):
NameError: global name '_remove_dead_weakref' is not defined
我的OS X上的python版本是否搞乱/需要修改?我该如何解决?
编辑:
我刚刚输入了'pip -V',这就是我得到的:
Traceback (most recent call last):
File "/usr/local/bin/pip", line 11, in <module>
load_entry_point('pip==10.0.1', 'console_scripts', 'pip')()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 480, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2691, in load_entry_point
return ep.load()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2322, in load
return self.resolve()
File "/usr/local/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2328, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/local/lib/python2.7/site-packages/pip/_internal/__init__.py", line 5, in <module>
import logging
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/logging/__init__.py", line 626, in <module>
_handlers = weakref.WeakValueDictionary() #map of handler names to handlers
File "/usr/local/Cellar/python@2/2.7.15/Frameworks/Python.framework/Versions/2.7/lib/python2.7/weakref.py", line 55, in __init__
def remove(wr, selfref=ref(self), _atomic_removal=_remove_dead_weakref):
NameError: global name '_remove_dead_weakref' is not defined