Cannot install pyside6 from pip.

huangapple go评论68阅读模式
英文:

Cannot install pyside6 from pip

问题

以下是您要翻译的内容:

"I'm looking at the Qt for Python1 documentation on how to install PySide6 and it should be simple enough:

pip install pyside6

It doesn't work, though:

ERROR: No matching distribution found for pyside6

I looked for it at pypi.org and found out the name of the package is PySide6, capitalized, not pyside6. Still, I tried it again, but had no luck:

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

Even if I explicitly pass --index-url to pip, as described in the official documentation, pip can't find pyside6 to install:

Looking in indexes: https://download.qt.io/snapshots/ci/pyside/6.0.0/latest
ERROR: Could not find a version that satisfies the requirement pyside6 (from versions: none)
ERROR: No matching distribution found for pyside6

(I tried several combinations of urls and package names)

Any idea to what's going on? Other pyside versions are available apparently. Not pyside6, though.

System information

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye
$ python3 --version
Python 3.9.2
$ pip --version
pip 23.0.1 from /usr/local/lib/python3.9/dist-packages/pip (python 3.9)
英文:

I'm looking at the Qt for Python1 documentation on how to install PySide6 and it should be simple enough:

pip install pyside6

It doesn't work, though:

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

I looked for it at pypi.org and found out the name of the package is PySide6, capitalized, not pyside6. Still, I tried it again, but had no luck:

$ sudo pip install PySide6
ERROR: Could not find a version that satisfies the requirement PySide6 (from versions: none)
ERROR: No matching distribution found for PySide6

Even if I explicitly pass --index-url to pip, as described in the official documentation, pip can't find pyside6 to install:

$ sudo pip install --index-url=https://download.qt.io/snapshots/ci/pyside/6.5/latest/ PySide6 --trusted-host download.qt.io
Looking in indexes: https://download.qt.io/snapshots/ci/pyside/6.0.0/latest
ERROR: Could not find a version that satisfies the requirement pyside6 (from versions: none)
ERROR: No matching distribution found for pyside6

(I tried several combinations of urls and package names)

Any idea to what's going on? Other pyside versions are available apparently. Not pyside6, though.

System information

$ lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye
$ python3 --version
Python 3.9.2
$ pip --version
pip 23.0.1 from /usr/local/lib/python3.9/dist-packages/pip (python 3.9)

答案1

得分: 1

PySide6 项目似乎与其发布的 Windows Python 版本极不一致!

如果您查看 PyPi 上此软件包的版本历史,在每个版本下点击 "Download files" 选项卡,您将看到我所指的问题。

6.0.0:https://pypi.org/project/PySide6/6.0.0/#files
支持“常规” Python 3.6-3.9(cpython: cp36 cp37 cp38 cp39)

6.2.0:https://pypi.org/project/PySide6/6.2.0/#files
依然很好,支持常规的 CPython 3.6 - 3.10(cp36 cp37 cp38 cp39 cp310)

6.3.2:https://pypi.org/project/PySide6/6.3.2/#files
只支持 cp36?为什么?

6.4.0:https://pypi.org/project/PySide6/6.4.0/#files
支持 cp36 和 pp39。所以只支持“正常” Python 3.6(甚至那时都已弃用的版本)和 PyPy 3.9。

6.4.0.1:https://pypi.org/project/PySide6/6.4.0.1/#files
支持 cp37 和 pp39。所以他们升级了“正常” Python 到 3.7,但仍然只支持相同的 PyPy 3.9。3.7 将在一个月后停止维护,所以仍然非常老旧。

自那时以来一直如此,只发布支持几乎已经过时的 Python 3.7 和另一种 Python PyPy 3.9。

这就是为什么在 Windows 上尝试仅仅运行 "pip install pyside6" 通常会失败的原因,因为没有发布支持常见安装在 Windows 上的 Python 版本的支持。

英文:

The PySide6 project appears to be horribly inconsistent with the windows python versions they release for!

If you look through the version history for the package on PyPi, clicking on the "Download files" tab for each one you'll see what I'm referring to.

6.0.0: https://pypi.org/project/PySide6/6.0.0/#files
supports "regular" python 3.6-3.9 (cpython: cp36 cp37 cp38 cp39)

6.2.0: https://pypi.org/project/PySide6/6.2.0/#files
still good, regular cpython 3.6 - 3.10 (cp36 cp37 cp38 cp39 cp310)

6.3.2: https://pypi.org/project/PySide6/6.3.2/#files
cp36 only? Why?

6.4.0: https://pypi.org/project/PySide6/6.4.0/#files
cp36 and pp39. So "normal" python 3.6 (a deprecated version even then) and pypy 3.9 only.

6.4.0.1: https://pypi.org/project/PySide6/6.4.0.1/#files
cp37 and pp39. So they upgraded "normal" python to just 3.7 and the same pypy 3.9 only. 3.7 is reacing EOL in a month, so still very old.

And that's the way it's been ever since, publishing only for an almost obsolete python 3.7 and an alternate python pypy 3.9.

This is why when you try to just "pip install pyside6" on windows it will almost always fail, because there's no published support for the commonly installed python versions on windows.

答案2

得分: 0

尝试指定版本:

pip install pyside6==6.0

另外,在您提供的链接中,需要创建文件夹:

> 创建和激活环境,您可以在终端上运行以下命令来完成此步骤:

python -m venv env  #(您的Python可执行文件可能称为python3)

> 对于Linux和macOS,运行以下命令激活环境:

source env/bin/activate

> 对于Windows,运行以下命令激活环境:

env\Scripts\activate.bat

在您的问题中,我没有看到这个步骤。

英文:

Try to specify version:

pip install pyside6==6.0

Also in the link which you provided it is necessary to create folder:

> Creating and activating an environment You can do this by running the following on a terminal:
python -m venv env, (Your Python executable might be called python3)

> source env/bin/activate for Linux and macOS

> env\Scripts\activate.bat for Windows

In your question I do not see this step.

huangapple
  • 本文由 发表于 2023年3月31日 22:46:38
  • 转载请务必保留本文链接:https://go.coder-hub.com/75899868.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定