如何安装要运行的表模块?

2024-06-16 09:24:16 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在尝试运行一些由协作者在python2中编写的代码,这需要tables模块。通过在命令行将表成功导入到python3shell中,我检查了表是否已安装,但在python2中执行相同操作时,没有名为tables的模块

到目前为止,我找到的所有答案似乎都不能解决我的问题,有什么想法吗

干杯:)


Tags: 模块答案代码命令tables行将python2协作者
2条回答

尝试用下载包

pip install tables==3.5.2Python 2

另外,在GitHub上关注这个问题,在#772

It's not recommended to use python2 as the end of its life on January 1st, 2020, Please consider visiting this documentation Migrating from PyTables 2.x to 3.x

使用命令-pip install tables

C:\Python27\Scripts>pip.exe install tables

DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting tables
  Downloading https://files.pythonhosted.org/packages/84/86/34604cfd8e79d23ffef7f1c0ab134ddb98da572d0fcb9cb4631d5b47f549/tables-3.5.2-cp27-cp27m-win_amd64.whl (3.5MB)
     |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 3.5MB 787kB/s
Collecting numexpr>=2.6.2
  Downloading https://files.pythonhosted.org/packages/45/d3/5997f8c7d48d4947665c7e7dfaabc3076da85390faf015288e39f242d520/numexpr-2.7.0-cp27-none-win_amd64.whl (106kB)
     |UUUUUUUUUUUUUUUUUUUUUUUUUUUUUUUU| 112kB 3.4MB/s
Requirement already satisfied: six>=1.9.0 in c:\python27\lib\site-packages (from tables) (1.12.0)
Requirement already satisfied: numpy>=1.9.3 in c:\python27\lib\site-packages (from tables) (1.16.5)
Collecting mock>=2.0
  Downloading https://files.pythonhosted.org/packages/05/d2/f94e68be6b17f46d2c353564da56e6fb89ef09faeeff3313a046cb810ca9/mock-3.0.5-py2.py3-none-any.whl
Collecting funcsigs>=1; python_version < "3.3"
  Downloading https://files.pythonhosted.org/packages/69/cb/f5be453359271714c01b9bd06126eaf2e368f1fddfff30818754b5ac2328/funcsigs-1.0.2-py2.py3-none-any.whl
Installing collected packages: numexpr, funcsigs, mock, tables
  WARNING: The scripts pt2to3.exe, ptdump.exe, ptrepack.exe and pttree.exe are installed in 'c:\python27\Scripts' which is not on PATH.
  Consider adding this directory to PATH or, if you prefer to suppress this warning, use  no-warn-script-location.
Successfully installed funcsigs-1.0.2 mock-3.0.5 numexpr-2.7.0 tables-3.5.2

C:\Python27\Scripts>

相关问题 更多 >