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. 海拔(bzoj 2007)

    Description YT市是一个规划良好的城市,城市被东西向和南北向的主干道划分为n×n个区域.简单起见,可以将YT市看作一个 正方形,每一个区域也可看作一个正方形.从而,YT城市中包括(n+1) ...

  2. MYSQL 存储过程 多表更新异常捕捉和异常处理方式

    今天在做MYSQL 存储过程 多表更新的功能   多表更新时候注意事项 1.首先是确保多表更新能够一次执行,途中没有哪个表的sql语句错误 2.上线后修改表结构及字段,请注意检查是否影响mysql 过 ...

  3. .NET and php

    原文发布时间为:2011-12-29 -- 来源于本人的百度文章 [由搬家工具导入] http://www.php-compiler.net/blog/2011/phalanger-3-0

  4. vue-cli脚手架每行注释

    .babelrc文件 { // 此项指明,转码的规则 "presets": [ // env项是借助插件babel-preset-env,下面这个配置说的是babel对es6,es ...

  5. 当一个窗体上有PageControl 控件时,是先执行 FormShow呢,还是先执行PageControl 的 TabSheet2Show呢

    答案是 先执行 TabSheet2Show  ,总算知道了,顺便推理 Onshow事件的执行顺序是 从内到外,先执行容器内的控件的事件,再执行 窗体的事件

  6. 2018年东北农业大学春季校赛 K wyh的数列【数论/斐波那契数列大数取模/循环节】

    链接:https://www.nowcoder.com/acm/contest/93/K来源:牛客网 题目描述 wyh学长特别喜欢斐波那契数列,F(0)=0,F(1)=1,F(n)=F(n-1)+F( ...

  7. Educational Codeforces Round 34 D. Almost Difference【模拟/stl-map/ long double】

    D. Almost Difference time limit per test 2 seconds memory limit per test 256 megabytes input standar ...

  8. AtCoder Beginner Contest 084 D - 2017-like Number【数论/素数/前缀和】

    D - 2017-like Number Time limit : 2sec / Memory limit : 256MB Score : 400 points Problem Statement W ...

  9. 详解Swift和OC的混编

    前言: 我们在一些情况下,仅仅使用swift 是无法完成一个项目的,在swift项目中必要用到 OC 实现一些功能,比如,项目要使用一些第三方的框架,但这个第三方的框架却是用 OC 实现的,或者你的项 ...

  10. java.sql.Timestamp类型

    如果想向数据库中插入日期时间的话,可以用java.sql.Timestamp类 一个与 java.util.Date类有关的瘦包装器 (thin wrapper),它允许 JDBC API 将该类标识 ...