Ошибки при установке pip websocket-client на OSX - PullRequest
0 голосов
/ 05 мая 2018

Я могу успешно подключить свой клиент веб-сокетов к серверу веб-сокетов, но когда я пытаюсь отправить ему какое-либо сообщение, выдается следующее сообщение:

error =  'NoneType' object has no attribute 'connected'

Похоже, мне нужно использовать websockets-client вместо просто websockets, поэтому я пытаюсь установить его с помощью pip и получаю множество ошибок. Как мне исправить эти ошибки, чтобы я мог использовать websockets-client на python?

$ pip uninstall websocket
Skipping websocket as it is not installed.
$ pip install websocket-client
Requirement already satisfied: websocket-client in /usr/local/lib/python2.7/site-packages (0.44.0)
Requirement already satisfied: six in /usr/local/lib/python2.7/site-packages (from websocket-client) (1.10.0)
pyobjc-framework-mapkit 3.1.1 requires pyobjc-framework-CoreLocation>=3.1.1, which is not installed.
pyobjc-framework-syncservices 3.1.1 requires pyobjc-framework-CoreData>=3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-Accounts==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-AddressBook==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-AppleScriptKit==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-AppleScriptObjC==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-ApplicationServices==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-Automator==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-AVFoundation==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-AVKit==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-CalendarStore==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-CFNetwork==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-CloudKit==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-Collaboration==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-Contacts==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-ContactsUI==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-CoreBluetooth==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-CoreData==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-CoreLocation==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-CoreText==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-CoreWLAN==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-CryptoTokenKit==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-DictionaryServices==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-DiskArbitration==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-EventKit==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-ExceptionHandling==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-FinderSync==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-FSEvents==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-GameCenter==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-GameController==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-ImageCaptureCore==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-IMServicePlugIn==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-InputMethodKit==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-InstallerPlugins==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-InstantMessage==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-LatentSemanticMapping==3.1.1, which is not installed.
pyobjc 3.1.1 requires pyobjc_framework-LaunchServices==3.1.1, which is not installed.
mitmproxy 0.18.3 has requirement requests<2.12,>=2.9.1, but you'll have requests 2.18.4 which is incompatible.
viper 0.0.1 has requirement ethereum==2.0.4, but you'll have ethereum 1.6.1 which is incompatible.

1 Ответ

0 голосов
/ 05 мая 2018

pip должен быть в состоянии решить ваши недостающие зависимости для вас, но две ошибки, с которыми вы столкнулись, находятся в последних двух строках. А именно, у вас есть несовместимые требования к версиям для requests и ethereum. Вы можете попытаться изменить версии этих пакетов, но это может привести к поломке других приложений в вашей системе.

В этом случае я рекомендую использовать виртуальную среду Python, которая обеспечит, чтобы зависимости вашей программы не приводили к несовместимости зависимостей с другими программами в системе.

Хорошее справочное руководство по управлению пакетами в виртуальной среде находится здесь: http://docs.python -guide.org / ru / latest / dev / virtualenvs /

...