>

https://pawelmhm.github.io/python/websockets/2016/01/02/playing-with-websockets.html 이지만 Twisted가 작동하지 않습니다. macOS High Sierra 10.13.5 및 Python 3.6.4 (가상 환경에서)를 사용하고 있습니다.

내가 사용한 가상 환경을 만들려면 : python3 -m venv venv . venv/bin/activate

여기서 python3은 내 시스템에 설치된 python 3.6.4입니다. $ which python3 /Library/Frameworks/Python.framework/Versions/3.6/bin/python3

pip를 사용하여 꼬인 설치를 시도했습니다 :

$ pip install twisted
Collecting twisted
  Downloading https://files.pythonhosted.org/packages/12/2a/e9e4fb2e6b2f7a75577e0614926819a472934b0b85f205ba5d5d2add54d0/Twisted-18.4.0.tar.bz2 (3.0MB)
    100% |████████████████████████████████| 3.0MB 1.9MB/s 
Collecting zope.interface>=4.4.2 (from twisted)
  Downloading https://files.pythonhosted.org/packages/ac/8a/657532df378c2cd2a1fe6b12be3b4097521570769d4852ec02c24bd3594e/zope.interface-4.5.0.tar.gz (151kB)
    100% |████████████████████████████████| 153kB 281kB/s 
Collecting constantly>=15.1 (from twisted)
  Downloading https://files.pythonhosted.org/packages/b9/65/48c1909d0c0aeae6c10213340ce682db01b48ea900a7d9fce7a7910ff318/constantly-15.1.0-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from twisted)
  Downloading https://files.pythonhosted.org/packages/f5/1d/c98a587dc06e107115cf4a58b49de20b19222c83d75335a192052af4c4b7/incremental-17.5.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted)
  Downloading https://files.pythonhosted.org/packages/a3/86/14c16bb98a5a3542ed8fed5d74fb064a902de3bdd98d6584b34553353c45/Automat-0.7.0-py2.py3-none-any.whl
Collecting hyperlink>=17.1.1 (from twisted)
  Downloading https://files.pythonhosted.org/packages/a7/b6/84d0c863ff81e8e7de87cff3bd8fd8f1054c227ce09af1b679a8b17a9274/hyperlink-18.0.0-py2.py3-none-any.whl
Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages (from zope.interface>=4.4.2->twisted) (28.8.0)
Collecting attrs>=16.1.0 (from Automat>=0.3.0->twisted)
  Downloading https://files.pythonhosted.org/packages/41/59/cedf87e91ed541be7957c501a92102f9cc6363c623a7666d69d51c78ac5b/attrs-18.1.0-py2.py3-none-any.whl
Requirement already satisfied: six in /Users/sumit/Library/Python/3.6/lib/python/site-packages (from Automat>=0.3.0->twisted) (1.11.0)
Collecting idna>=2.5 (from hyperlink>=17.1.1->twisted)
  Downloading https://files.pythonhosted.org/packages/4b/2a/0276479a4b3caeb8a8c1af2f8e4355746a97fab05a372e4a2c6a6b876165/idna-2.7-py2.py3-none-any.whl (58kB)
    100% |████████████████████████████████| 61kB 2.8MB/s 
Installing collected packages: zope.interface, constantly, incremental, attrs, Automat, idna, hyperlink, twisted
  Running setup.py install for zope.interface ... done
  Running setup.py install for twisted ... done
Successfully installed Automat-0.7.0 attrs-18.1.0 constantly-15.1.0 hyperlink-18.0.0 idna-2.7 incremental-17.5.0 twisted-18.4.0 zope.interface-4.5.0

그러나 계속 오류가 발생합니다 :

$ python server.py
Traceback (most recent call last):
  File "server.py", line 4, in <module>
    from twisted.web.static import File
ModuleNotFoundError: No module named 'twisted'

웹에서 검색했을 때 유용한 해결책이 없었으며 easy_install 를 사용하려고 시도했습니다.  또는 brew  너무 작동하지 않았다. 모든 제안에 감사드립니다.

  • 이전 Visual Studio 2015에서 폴리머 실행
  • 다음 c# - 메소드를 찾을 수 없음 - "boolean addtocartmodelget_btnhideonstatus"가 addtocart 모델에 새 특성을 추가했습니다