- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
由于控制台继续使用 Six 的 1.4.1 版本而不是 1.9,我的 python 中存在一些依赖性问题。
所以,在我的 python IDLE 上:
>>> import six
>>> six.__version__
'1.4.1'
但是在我的 pip 上:
$ pip freeze
six==1.9.0
如何强制我的 IDLE 使用正确的版本?
我尝试使用 pip 卸载和安装。
从python -v输出,然后导入六个
# /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.pyc matches /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.py
import six # precompiled from /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/six.pyc
dlopen("/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so", 2);
import operator # dynamically loaded from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/operator.so
# /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/StringIO.pyc matches /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/StringIO.py
import StringIO # precompiled from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/StringIO.pyc
最佳答案
您正在使用不同版本的 pip 和 python,pip 来自 /Library/[...]
而您的 python 来自 /System/Library/[... ]
您可以使用 /Library/[...]
中的 python 或 /System/Library/[...]
中的 pip。您也可以使用 virtualenv .来自文档:
virtualenv is a tool to create isolated Python environments. [...] It creates an environment that has its own installation directories, that doesn’t share libraries with other virtualenv environments (and optionally doesn’t access the globally installed libraries either).
关于python - 我的 python 控制台拒绝使用最新版本的 Six,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29169209/
我在 Mac OS X El Capitan 上运行 python 3.6。 我正在尝试运行使用六个模块的代码,但出现以下错误: ImportError:没有名为 6 的模块。 当我搜索六个时,它似乎
我无法导入 pkg_resources。每当我尝试时它都会显示 Python 3.5.2 (default, Jun 28 2016, 08:46:01) [GCC 6.1.1 20160602] o
我安装了六个(甚至重新安装了它)。 $ pip show six --- Name: six Version: 1.7.3 Location: /usr/lib/python2.6/site-pack
你好 Stackoverflow 社区 我一直在努力了解 Django(和 Wagtail 的 Stream-field)在幕后是如何工作的。通过这样做,我了解了元类并相信掌握了原理。也就是说,SIX
由于控制台继续使用 Six 的 1.4.1 版本而不是 1.9,我的 python 中存在一些依赖性问题。 所以,在我的 python IDLE 上: >>> import six >>> six._
我在 Windows 7 上运行 Python 2.7.13,并且收到此错误: ImportError: No module named six 但是我在“C:\Python27\Lib\site-p
我正在从 openstack 复制一些代码片段,但是当它运行到: import six.moves.xmlrpc_client as xmlrpclib 我收到以下错误: import six
在 Python 入门类(class)中,我接到了一项任务,要对滚骰子进行模拟 您希望您所有的骰子(总共 5 个)的值都是 6,然后计算一个人总共需要掷多少次才能得到所有的 6。我需要一个模拟此问题
有人有从 SIX Swiss Exchange 检索特定股票的实时股票数据的经验吗?最好是 JSON 数据,因为我要在网站上显示它。 有很多图表工具,所以显示数据不是主要问题。 数据不需要直接来自 S
我有一个连接到 YouTube API 版本 3 并检索公共(public)数据的脚本。这个脚本部署在 Airflow 中,它工作了一个月,今天它失败了,下面一行显示了这条消息: def youtub
我想使用pdfminer.six这是一个工具,可以与Python3一起使用以从PDF文档中提取信息。问题在于根本没有好的文档,也没有关于如何使用该工具的源代码示例。 我已经尝试过StackOverfl
我在尝试导入 matplotlib 时遇到了这个问题。 这是我遇到的错误: Traceback (most recent call last): File "C:/xxx/solver.py",
使用通过 pip install git+https://github.com/pdfminer/pdfminer.six.git 安装的 pdfminer(latest version from g
我正在尝试使用 gmusicapi( https://github.com/simon-weber/gmusicapi )。但是,当我尝试以下行时: from gmusicapi import Web
Python 一直说没有名为 6 的模块,但是已经使用了一个 pip install six并重新安装了几次。 Traceback (most recent call last): File "/Us
收到错误:尝试编译时“6”的类型冲突。 void main(){ const int k = 4; six(&k); } float * six(const int *x) {
我想提取此 pdf 的文本:https://github.com/pdfminer/pdfminer.six/files/1887670/Wochenkarte-KW-15-Neu.pdf 当我使用这
我正在尝试在从 six.moves.urllib_parse 导入 urlparse 的程序上使用 py2exe。程序如下: # hello.py from six.moves.urllib_pars
使用Python 2.7。作为 JSON 响应的一部分,API 返回字符串: TweetDeck 我正在使用一个内部执行的库: six.u(json.dumps(s)) json.dumps() 输出
本指南,Writing code that runs under both Python2 and 3 , 指出 Use the third party six module sparingly (i
我是一名优秀的程序员,十分优秀!