简体   繁体   English

如何安装 python package tobii_research?

[英]How do I install python package tobii_research?

I am trying to install tobii_research for a project and I was following the instructions on http://developer.tobiipro.com/python/python-getting-started.html我正在尝试为一个项目安装 tobii_research,我正在按照http://developer.tobiipro.com/python/python-getting-started.html上的说明进行操作

I already have python 3.7.6 and pip 21.1.2 installed on my Mac.我的 Mac 上已经安装了 python 3.7.6 和 pip 21.1.2。

When I run pip install tobii-research I get:当我运行pip install tobii-research时,我得到:

ERROR: Could not find a version that satisfies the requirement tobii_research (from versions: none)
ERROR: No matching distribution found for tobii-research

Was there something I forgot to install?有什么我忘了安装的吗?

I can not for the life of me figure out how to install this manually either.我一辈子也想不出如何手动安装它。 Help with pip, or installing manually would be greatly appreciated, but you might have to explain it to me like I am stupid.帮助 pip,或手动安装将不胜感激,但你可能不得不向我解释,因为我很愚蠢。

Thanks in advance.提前致谢。

It appears that you are not running the correct python version for the versions of the package that are available.您似乎没有为可用的软件包版本运行正确的 python 版本。 If you look at the wheel files available on the tobii-research Downloads page, the software is packaged for either python 2.7 or 3.6.如果您查看 tobii-research 下载页面上提供的轮文件,该软件是为 python 2.7 或 3.6 打包的。

When trying to install this package myself, I get the same error message as you when trying to install it for python 3.8, but the package installs successfully with my python 2.7 installation.尝试自己安装此软件包时,我在尝试为 python 3.8 安装它时收到与您相同的错误消息,但该软件包通过我的 python 2.7 安装成功安装。

I would recommend installing a compatible version of python and then running pip through that version using the following command:我建议安装兼容版本的 python,然后使用以下命令通过该版本运行 pip:

[specific_python_installation] -m pip install tobii-research

再次尝试使用 pip 执行此操作,但将下划线替换为连字符,如下所示:

pip install tobii-research

I saw on the PyPi website that they only have it for Python 3.8, so I downloaded that Python version from their official website and installed it (do not add it to path).我在PyPi 网站上看到他们只有 Python 3.8,所以我从他们的官方网站下载了 Python 版本并安装了它(不要将它添加到路径)。

Then, I created a virtual environment selecting 3.8 as the Python version (refer to this answer ) and activated that virtual environment.然后,我创建了一个虚拟环境,选择 3.8 作为 Python 版本(请参阅此答案)并激活该虚拟环境。

Finally, I run pip install tobii_research and it worked.最后,我运行pip install tobii_research并且成功了。

One thing that helped me - required Python version.对我有帮助的一件事 - 需要 Python 版本。 For example, for the version 1.10.2 (which is current at the moment of writing this) only Python 3.10 is supported.例如,对于版本1.10.2 (在撰写本文时为最新版本),仅支持 Python 3.10。 Check the list of files distributed within this version.检查此版本中分发的文件列表

I was able to install the package on Windows with Python 3.10 but on MacOS I had the same problem and wasn't able to resolve this - I assume it's a problem with the architecture, as there is no version for arm64 if you have a Mac with M1 processor.我能够使用 Python 3.10 在 Windows 上安装 package,但在 MacOS 上我遇到了同样的问题并且无法解决这个问题 - 我认为这是架构问题,因为如果你有 Mac,则没有arm64版本M1处理器。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM