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. LOJ#2131. 「NOI2015」寿司晚宴

    $n \leq 500$,$2-n$这些数字,两个人挑,可以重复挑,问有几种方案中,一个人选的所有数字与另一个人选的所有数字都互质. 不像前两题那么抠脚.. 如果$n$比较小的话,可以把两个人选的数字 ...

  2. JavaScript计算字符串中包含几个给定字符

    原文发布时间为:2009-05-04 -- 来源于本人的百度文章 [由搬家工具导入] 下面以 逗号 为例子: <html> <head><title>JavaScr ...

  3. powershell 调用winform dll

    //1.加载dll,调用winform窗体,使用指定构造函数 param{ $filePath="" } [void][reflection.assembly]::LoadFile ...

  4. Eclipse下搭建Maven框架

    内容中包含 base64string 图片造成字符过多,拒绝显示

  5. JQuery操作基本选择器

    <body> <input type="button" id="btn1" value="选择为one的元素"/> ...

  6. Codeforces 731B Coupons and Discounts(贪心)

    题目链接 Coupons and Discounts 逐步贪心即可. 若当前位为奇数则当前位的下一位减一,否则不动. #include <bits/stdc++.h> using name ...

  7. WinForm版聊天室复习Socket通信

    聊天室:服务器端-------------客户端 最终演示展示图: 一. 服务器端 对服务端为了让主窗体后台不处理具体业务逻辑,因此对服务端进行了封装,专门用来处理某个客户端通信的过程. 而由于通信管 ...

  8. 任务驱动,对比式学习.NET开发系列之开篇------开源2个小框架(一个Winform框架,一个Web框架)

    一 源码位置 1. Winform框架 2. web框架 二 高效学习编程的办法 1 任务驱动方式学习软件开发 大部分人学习软件开发技术是通过看书,看视频,听老师上课的方式.这些方式有一个共同点即按知 ...

  9. Using Blocks in iOS 4: Designing with Blocks

    In the first part of this series, we learned how to declare and call basic Objective-C blocks. The m ...

  10. django admin页面样式丢失问题

    wamp 配置django admin页面样式丢失问题 第一种方法:在apache配置文件httpd.conf中加入如下代码:Alias /static "E:\Python27\Lib\s ...