2017-10-13 230 views
2

我想在Python36-32上安装PySide,但在安装过程中遇到一些问题。在我的笔记本电脑中,目前安装了PySide的Python27。但是,由于Python27中的QString转换问题,我不得不切换到使用Python3。PySide安装错误与命令“python setup.py egg_info”失败,错误代码为1

下面是安装过程中的错误信息,不确定PySide版本是否在Python36-32中不可用或其他问题。

  • 一次尝试
 

    C:\Users\Maybel>pip3 install PySide 
    Collecting PySide 
     Using cached PySide-1.2.4.tar.gz 
     Complete output from command python setup.py egg_info: 
     only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)] 

     ---------------------------------------- 
    Command "python setup.py egg_info" failed with error code 1 in C:\Users\Maybel\AppData\Local\Temp\pip-build-xk_u6djn\PySide\ 

  • 尝试升级setuptools的,因为这是网上 here
 

    C:\Users\Maybel>pip3 install --upgrade setuptools 
    Requirement already up-to-date: setuptools in c:\users\maybel\appdata\local\programs\python\python36-32\lib\site-packages 

    C:\Users\Maybel>pip install PySide 
    Requirement already satisfied: PySide in c:\python27\lib\site-packages 

  • 山高建议的途径之一次尝试后升级的setuptools
 

    C:\Users\Maybel>pip3 install PySide 
    Collecting PySide 
     Using cached PySide-1.2.4.tar.gz 
     Complete output from command python setup.py egg_info: 
     only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)] 

     ---------------------------------------- 
    Command "python setup.py egg_info" failed with error code 1 in C:\Users\Maybel\AppData\Local\Temp\pip-build-6zrldsw7\PySide\ 

  • 尝试使用PIP安装PySide
 

    C:\Users\Maybel>pip install PySide 
    Requirement already satisfied: PySide in c:\python27\lib\site-packages 

请指点。感谢提前:)

回答

0

我看到这个错误输出:

only these python versions are supported: [(2, 6), (2, 7), (3, 2), (3, 3), (3, 4)] 

即PySide检查Python的版本并拒绝使用3.6。

+0

PySide在Python-3.6中工作得很好。问题在于pip3,而不是PySide。 – ekhumoro

+0

@ekhumoro你如何解释错误信息?我刚刚从PyPI下载了PySide,发现错误信息来自'setup.py'。 – phd

+0

不确定,但我在Arch Linux上安装了PySide-1.2.4并使用Python-3.6.2。我查看了[PKGBUILD](https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/python-pyside),但我没有看到任何补丁或编译它所需的其他时髦的东西。 – ekhumoro

相关问题