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./site-packages$ python
Python 2.7. |Anaconda custom (-bit)| (default, Oct , ::)
[GCC 7.2.] 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 , in <module>
File "/usr/local/caffe2/python/core.py", line , in <module>
from past.builtins import basestring
ImportError: No module named past.builtins
>>> exit()
whale@sea:~/anaconda2/lib/python2./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./dist-packages
whale@sea:~/anaconda2/lib/python2./site-packages$ pip install future
Collecting future
Downloading future-0.16..tar.gz (824kB)
% |████████████████████████████████| 829kB .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//7c/0d83b4baac4f63ff7a765bd16390d2ab43c93587fac9d6017a
Successfully built future
Installing collected packages: future
Successfully installed future-0.16.
whale@sea:~/anaconda2/lib/python2./site-packages$ python -c 'from caffe2.python import core' >/dev/null && echo "Success" || echo "Failure"
Success
whale@sea:~/anaconda2/lib/python2./site-packages$

caffe2--------ImportError: No module named past.builtins的更多相关文章

  1. 使用tensorboard报错 ImportError: No module named past.builtins

    安装 future pip install future conda install future

  2. Python2.7 xlwt安装 No module named future.builtins

    遇到的坑 事情是这样的,因为项目要使用Python配合软件集成时的自动化,以前遗留的Python代码已经out of date啦,只能亲自update,所以必须搭建Python环境,使用2.7版本(我 ...

  3. pytorch1.0 安装执行后报错ImportError: No module named future.utils

    File "/usr/local/lib/python2.7/dist-packages/caffe2/python/utils.py", line 10, in <modu ...

  4. ImportError: No module named 'requests'

    补充说明: 当前环境是在windows环境下 python版本是:python 3.4. 刚开始学习python,一边看书一边论坛里阅读感兴趣的代码, http://www.oschina.net/c ...

  5. python3中用HTMLTestRunner.py报ImportError: No module named 'StringIO'如何解决

    python3中用HTMLTestRunner.py报ImportError: No module named 'StringIO'的解决方法: 1.原因是官网的是python2语法写的,看官手动把官 ...

  6. Ubuntu: ImportError: No module named xgboost

    ImportError: No module named xgboost 解决办法: git clone --recursive https://github.com/dmlc/xgboost cd ...

  7. gdb 调试出现 ImportError: No module named 'libstdcxx'

    在emacs使用gdb调试程序,出现错误 , in <module> from libstdcxx.v6.printers import register_libstdcxx_printe ...

  8. 关于python3.X 报"import urllib.request ImportError: No module named request"错误,解决办法

    #encoding:UTF-8 import urllib.request url = "http://www.baidu.com" data = urllib.request.u ...

  9. virtualenv中ImportError: No module named django

    问题现象:在代码py文件中,import django 报错,但是在python shell中直接执行这个语句没错, 网上搜索了下,自己测试了下,确定原因是由于使用了python中的virtualen ...

随机推荐

  1. COGS 2485. [HZOI 2016]从零开始的序列

    2485. [HZOI 2016]从零开始的序列 ★★   输入文件:sky_seq.in   输出文件:sky_seq.out   简单对比时间限制:1 s   内存限制:256 MB [题目描述] ...

  2. 【转】C#获取客户端及服务器端主机信息及其获取IP地址

    原文发布时间为:2009-10-28 -- 来源于本人的百度文章 [由搬家工具导入] 小结: 1、REMOTE_ADDR 不可被修改,但是可能会获得代理服务器的IP,而不是实际客户端的IP。 2、通过 ...

  3. css create 多边形 polygon

    案例:   代码: element.style { width: 0; height: 0; /* border-left: 50px solid transparent; */ border-rig ...

  4. poj 3254 Corn Fields 状压dp入门

    题目链接 题意 在\(M\times N\)的\(0,1\)格子上放东西,只有标记为\(1\)的格子可以放东西,且相邻的格子不能同时放东西.问有多少种放法. 思路 参考:swallowblank. \ ...

  5. vmware tools安装过程

    每次通过vmware安装Ubuntu的时候,总是会多多少少出点问题.好容易披荆斩棘把镜像安好了,然而屏幕却只有小小一个,不能显示大屏,我就知道肯定是缺少了vmware tools.于是点击左上方菜单中 ...

  6. With语句在数据统计应用

    WITH TMP_EXECUTOR(EXECUTOR,EXECUTORNAME) AS ( SELECT DISTINCT T.EXECUTOR ,T1.FULLNAME AS EXECUTORNAM ...

  7. AC日记——[HNOI2007]紧急疏散evacuate bzoj 1189

    [HNOI2007]紧急疏散evacuate 思路: 处理每个人到门的最短路: 然后二分答案: s向人连边流量1: 人向门拆分后的点连边流量1(拆成400,前一个点连当前点流量INF): 然后门向t连 ...

  8. Guice 4.1教程

    Guice是Google开发的一个开源轻量级的依赖注入框架,运行速度快,使用简单. 项目地址:https://github.com/google/guice/ 最新的版本是4.1,本文基于此版本. 0 ...

  9. apache url rewrite问题

    apache RewriteEngine Your browser sent a request that this server could not understand http://www.ra ...

  10. 在WCF中使用websocket

    今天在网上闲逛的时候,发现WCF4.5中新增了一个NetHttpBinding协议,它是支持Websocket的.在网上找了一下教程,附上codeproject上的两篇文章: http://www.c ...