python虚拟环境安装pyqt5,如何在新的virtualenv上安装PyQt5并在IDLE上工作

I installed PyQt5 globally on my win7 system (python 3.3), using the installer provided from the official riverbank website.

Then i created a new –no-site-packages virtualenv, where the only things i see listed after typing pip list, are pip (1.4) and setuptools (0.9.7).

The problem now however, is that i need to install there the complete PyQt5 too and this seems impossible using the pip tool.

Both pip install sip and pip install PyQt5 inside the virtual enviroment are returning errors.

Can someone provide a "how to" guide of what exactly should i do?

I also want to be able to work with that PyQt5 (of the new virtualenv) from inside an IDLE, so

I copied the tcl folder from the global installation of my Python to the location of my virtual environment and also created a shortcut targeting: {location of my virtual enviroment}\Scripts\pythonw.exe C:\Python33\Lib\idlelib\idle.pyw so i could open the virtualenv IDLE and not the global one. (Hope I did not do anything wrong there... correction maybe please.)

解决方案Both "pip install sip" and "pip install PyQt5" inside the virtual enviroment are returning errors.

If the errors you're referring to are:

Could not find any downloads that satisfy the requirement [pyqt5|sip]

and

No distributions at all found for [pyqt5|sip]

Then this answer should shed light on this. Basically, PyPI is only providing a link to the homepage and/or source -- not a downloadable package or egg. Here are the links to PyQt5 and SIP PyPI pages. I know it seems strange that a package manager wouldn't provide packages, but that's the way it is.

You'll have to download, compile, and install sip and pyqt5 from source, inside your virtualenv. I wish I could provide details but I'm currently working through this myself.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值