找不到满足 context.viewer 要求的版本(来自上下文)

问题描述 投票:0回答:4

我正在尝试使用以下命令在 python 中安装上下文模块:

pip install context
但我遇到这个错误:

 ERROR : could not find a version that satisfies the requirement context.viewer (from context)
 ERROR : no matching distribution found for context.viewer

我尝试了网站上提到的所有解决方案,但没有得到任何结果。

python pip
4个回答
2
投票

context
需要
context.api
context.viewer
;前者可用,但后者不可用。

两个可用模块均为 0.0 版本,于 2012 年发布。底线:该模块已被废弃和损坏,别管它了。

您确定您确实需要这个模块而不是另一个吗? “上下文”这个词在编程中用得相当多……


0
投票

晚上好, 我可以在 pycharm 中安装上下文,也可以在我的 PC 的终端中安装上下文。 升级 pip、setuptools、wheel:

python3 -m pip install --升级 pip setuptools 轮

apt-get 安装 python3-venv

进入 venv 模式:

源/home/vb1/PycharmProjects/sub-vb1.py/venv/bin/activate

pip 安装 context.api

创建 venv(虚拟环境)有 3 种方法: https://virtualenvwrapper.readthedocs.io/en/latest/ https://packaging.python.org/en/latest/tutorials/installing-packages/#optionally-create-a-virtual-environment

https://docs.python.org/3/library/venv.html

#总而言之,最简单的方法就是使用pycharm:

  • 安装包“context.api”里面
  • 然后在项目设置 -> 项目结构 -> 将项目路径设置为红色(排除)并将 VENV 设置为蓝色(源)。它为您的项目激活 venv。

我的 github 页面中也有一些代码示例:

https://github.com/amin-tayebi/Smart-Irrigation-Precision-Agriculture-using-Lorawan/tree/main/API


0
投票

如果您尝试直接从 sqlalchemy 导入上下文,请尝试 sqlalchemy.orm


-1
投票

如果您尝试渲染 wxPython、PyGame 和 GLUT 的上下文(包括导航)以及 Tkinter 的部分上下文,请使用此工具。

pip install OpenGLContext
© www.soinside.com 2019 - 2024. All rights reserved.