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. 从无序序列中求这个序列排序后邻点间最大差值的O(n)算法

    标题可能比较绕口,简单点说就是给你一个无序数列A={a1,a2,a3……an},如果你把这个序列排序后变成序列B,求序列B中相邻两个元素之间相差数值的最大值. 注意:序列A的元素的大小在[1,2^31 ...

  2. Scrapy学习-23-分布式爬虫

    scrapy-redis分布式爬虫 分布式需要解决的问题 request队列集中管理 去重集中管理 存储管理   使用scrapy-redis实现分布式爬虫 github开源项目: https://g ...

  3. c# 序列化对象为xml 方法

    public static string XmlUtils(object obj, bool omitXmlDeclaration = true, bool indent = false, bool ...

  4. codevs——1220 数字三角形(棋盘DP)

     时间限制: 1 s  空间限制: 128000 KB  题目等级 : 黄金 Gold 题解       题目描述 Description 如图所示的数字三角形,从顶部出发,在每一结点可以选择向左走或 ...

  5. Arduino可穿戴教程认识ArduinoIDE

    Arduino可穿戴教程认识ArduinoIDE 认识ArduinoIDE Arduino IDE在Windows和Linux平台下除了启动方式之外,其他的使用方式基本是一致的.下面简单介绍一下常用的 ...

  6. [java基础] 002 - 位运算符的详解和妙用

    一:位运算符详解 位运算符主要用来对操作数二进制的位进行运算.按位运算表示按每个二进制位(bit)进行计算,其操作数和运算结果都是整型值. Java 语言中的位运算符分为位逻辑运算符和位移运算符两类, ...

  7. asp.net上传文件夹权限配置以及权限配置的分析

    切记:一定要禁止给公共上传文件夹的权限设置为everyone,且为完全控制!除非你这个文件夹属于内部操作的,那这样做是允许,其余情况一律禁止! 基本的文件上传文件夹权限配置: 1.在需要配置上传的文件 ...

  8. JetBrains软件开发框架下的类似于“.IntelliJIdea2018.1”的配置文件夹的移动

    JetBrains软件开发框架下几款软件,如: 会在C盘用户文件夹下生成很大的配置文件夹(IDE config folder),十分占空间,也影响电脑性能. 这些索引目录移动的原理相似,现在以Idea ...

  9. 避免在block中循环引用(Retain Cycle in Block)

    让我们长话短说.请参阅如下代码: - (IBAction)didTapUploadButton:(id)sender { NSString *clientID = @"YOUR_CLIENT ...

  10. mac 破解photoshop cs6

    1 首先安装photoshop cs6,安装好后退出 2 下载破解补丁 破解补丁文件网盘下载:https://pan.baidu.com/s/1hrXieqS 或自行在百度网页里搜amtlib.fra ...