Python:如何让不同版本的python访问相同的模块?

问题描述:

我使用一个mac,并且我有两个版本的python(2.7和3.5)。我安装scitools使用pipimport from scitools import *与2.7但不3.5。我想知道是因为链接还是其他原因。我已经包含了一个截图。谢谢!Python:如何让不同版本的python访问相同的模块?

enter image description here

编辑:

pip3 install scitools给出:

enter image description here

+1

您需要使用'pip3'安装'scitools'才能使用python3 –

+0

@MoinuddinQuadri感谢您的快速回复。我用截图进行了编辑。我收到一个错误,表示scitools没有匹配的发行版 – Johnathan

scitools需要Python 2.7(来源:github)。它显然没有得到积极的维护,所以不要等待Python 3的支持。

+0

非常感谢您的帮助。我不会在周围等待!大声笑:) – Johnathan

正如你可以阅读https://github.com/hplgit/scitools,模块依赖是Python2.7和numpy。

+0

非常感谢您的时间和快速回答! :) – Johnathan