通过 pip install h5pyViewer 安装 h5pyViewer 时出错

Error installing h5pyViewer by pip install h5pyViewer

我正在尝试使用 pip install h5pyViewer 安装 h5pyViewer,但出现错误。 Collecting h5pyViewer Using cached h5pyViewer-0.0.1.6.tar.gz (74 kB) ERROR: Command errored out with exit status 1: command: /home/madhur/miniconda3/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-kx4npfnx/h5pyviewer/setup.py'"'"'; __file__='"'"'/tmp/pip-install-kx4npfnx/h5pyviewer/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-9tb86g5b cwd: /tmp/pip-install-kx4npfnx/h5pyviewer/ Complete output (6 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-kx4npfnx/h5pyviewer/setup.py", line 82 print ':'+ver+':'+gitcmt+':' ^ SyntaxError: Missing parentheses in call to 'print'. Did you mean print(':'+ver+':'+gitcmt+':')? ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Python版本为3.8.2 点子版本是 20.2.4 Ubuntu 20.04.2 LTS

h5pyViewer 0.0.1.6 was released to PyPI at Nov 5, 2015. The code is obviously Python2-only. The problem was fixed in the git repository in commit 5229b39 2018 年 11 月 12 日。

不幸的是,由于 octal 0755 and other compatibility problems,它仍然与 Python3 不兼容。底线:它仍然是 Python2-only。

fork更新为Python 3.你可以试试:

pip install git+https://github.com/Eothred/h5pyViewer.git