簡體   English   中英

Pip 不會在 Windows 上安裝 Twisted

[英]Pip doesn't install Twisted on Windows

我正在嘗試在 Windows 8 計算機上安裝 Twisted。 在官方 Twisted 網站上,windows 只有一個 Wheel 文件。

https://twistedmatrix.com/trac/wiki/Downloads

我已經安裝了 Zope 和 PyWin32。

但是當我這樣做時:

pip install Twisted-16.0.0-cp27-none-win_amd64.whl

我得到:

Twisted-16.0.0-cp27-none-win_amd64.whl is not a supported wheel on this platform

我已經看到並嘗試了這兩個主題的解決方案:

filename.whl 在此平台上不受支持如何安裝帶有 .whl 文件的 Python 包?

pip 是最新的,安裝了 CPython2.7,我試過

python -m pip intall

path\to\pip install

它都沒有奏效。

我錯過了什么,我還沒有嘗試過什么?

使用此鏈接。 http://www.lfd.uci.edu/~gohlke/pythonlibs/#twisted

它是非官方模塊的存儲庫,但每次都對我有用。 使用win32版本。

我也遇到了同樣的問題,但我解決了以下問題:以管理員身份打開 Anaconda Prompt(對於Windows10 :打開cortana /write Anaconda Prompt /choose Run as Administrator

你應該走 Anaconda 的道路,對我來說就像:

C:\WINDOWS\system32>cd ..
C:\WINDOWS>cd..
C:\>cd  ProgramData
C:\ProgramData>cd Anaconda3
C:\ProgramData>Anaconda3>

然后你應該運行以下命令

C:\ProgramData>Anaconda3>conda install -c anaconda twisted

在某些時候它會問

Proceed ([y]/n)?

輸入y 現在安裝了twisted

回答我自己的帖子。

正如 Rod Hyde 評論的那樣,Twisted 只支持 64 位版本的 Python。

編輯回答 anatoly :在 Twisted 的 Windows 下載部分,它被寫成“Twisted 16.0.0 for Python 2.7 64 bits

構建 32 位 Twisted Wheels 的 Windows XP 已退役,因此沒有構建構建。 人們建議在 64 位 Windows builder 上安裝 32 位工具鏈,這樣他們可能很快就會回來。

https://twistedmatrix.com/pipermail/twisted-python/2016-March/030227.html

https://twistedmatrix.com/trac/ticket/8314

這在 Windows 上非常簡單。 您需要單獨安裝 Twisted。

只需2步:

pip install pipwin
pipwin install Twisted

推薦的方法是運行 pip install Twisted,最好在 virtualenv 中運行。

如果您在 macOS 上安裝, pip install Twisted[macos_platform] 將安裝特定於 macOS 的要求。

如果您在 Windows 上安裝,pip install Twisted[windows_platform] 將安裝特定於 Windows 的要求。

https://twistedmatrix.com/trac/wiki/Downloads

謝謝你...

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM