兵马逐浪去,将象入海流。炮声震心动,惊起卧龙游。
我的博客园主页 --------- 我的知乎主页 --------- 我的github主页 --------- 我的csdn主页 --------- 我的新浪微博

caffe2--------ImportError: No module named past.builtins

 

 

 

复制代码
whale@sea:~/anaconda2/lib/python2.7/site-packages$ python  
Python 2.7.14 |Anaconda custom (64-bit)| (default, Oct 16 2017, 17:29:19) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import  caffe2
>>> import  caffe2.python
>>> import  caffe2.python.core
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/caffe2/python/core.py", line 9, in <module>
    from past.builtins import basestring
ImportError: No module named past.builtins
>>> exit()
whale@sea:~/anaconda2/lib/python2.7/site-packages$ sudo  pip install future
The directory '/home/whale/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/whale/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: future in /usr/local/lib/python2.7/dist-packages
whale@sea:~/anaconda2/lib/python2.7/site-packages$ pip  install   future  
Collecting future
  Downloading future-0.16.0.tar.gz (824kB)
    100% |████████████████████████████████| 829kB 1.5MB/s 
Building wheels for collected packages: future
  Running setup.py bdist_wheel for future ... done
  Stored in directory: /home/whale/.cache/pip/wheels/c2/50/7c/0d83b4baac4f63ff7a765bd16390d2ab43c93587fac9d6017a
Successfully built future
Installing collected packages: future
Successfully installed future-0.16.0
whale@sea:~/anaconda2/lib/python2.7/site-packages$ python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
Success
whale@sea:~/anaconda2/lib/python2.7/site-packages$ 
复制代码

 

复制代码
whale@sea:~/anaconda2/lib/python2.7/site-packages$ python  
Python 2.7.14 |Anaconda custom (64-bit)| (default, Oct 16 2017, 17:29:19) 
[GCC 7.2.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
>>> import  caffe2
>>> import  caffe2.python
>>> import  caffe2.python.core
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/caffe2/python/core.py", line 9, in <module>
    from past.builtins import basestring
ImportError: No module named past.builtins
>>> exit()
whale@sea:~/anaconda2/lib/python2.7/site-packages$ sudo  pip install future
The directory '/home/whale/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/whale/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Requirement already satisfied: future in /usr/local/lib/python2.7/dist-packages
whale@sea:~/anaconda2/lib/python2.7/site-packages$ pip  install   future  
Collecting future
  Downloading future-0.16.0.tar.gz (824kB)
    100% |████████████████████████████████| 829kB 1.5MB/s 
Building wheels for collected packages: future
  Running setup.py bdist_wheel for future ... done
  Stored in directory: /home/whale/.cache/pip/wheels/c2/50/7c/0d83b4baac4f63ff7a765bd16390d2ab43c93587fac9d6017a
Successfully built future
Installing collected packages: future
Successfully installed future-0.16.0
whale@sea:~/anaconda2/lib/python2.7/site-packages$ python -c 'from caffe2.python import core' 2>/dev/null && echo "Success" || echo "Failure"
Success
whale@sea:~/anaconda2/lib/python2.7/site-packages$ 
复制代码

 

posted @   leoking01  阅读(2515)  评论(0编辑  收藏  举报
编辑推荐:
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
阅读排行:
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
· 25岁的心里话
#back-to-top { background-color: #00CD00; bottom: 0; box-shadow: 0 0 6px #00CD00; color: #444444; padding: 10px 10px; position: fixed; right: 50px; cursor: pointer; }
点击右上角即可分享
微信分享提示