citronneur / rdpy

Remote Desktop Protocol in Twisted Python
GNU General Public License v3.0
1.67k stars 545 forks source link

Mac os install failed #128

Open etomarat opened 1 year ago

etomarat commented 1 year ago

Hello! Can't install on macOS 12.1. I am attaching a traceback:

(nbki-reporter-py3.10) ➜  nbki_reporter pip install rdpy
Collecting rdpy
  Downloading rdpy-1.3.2.zip (151 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.5/151.5 kB 977.3 kB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Requirement already satisfied: twisted in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from rdpy) (22.8.0)
Requirement already satisfied: pyopenssl in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from rdpy) (22.0.0)
Requirement already satisfied: service_identity in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from rdpy) (21.1.0)
Requirement already satisfied: qt4reactor in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from rdpy) (1.6)
Requirement already satisfied: rsa in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from rdpy) (4.9)
Requirement already satisfied: pyasn1 in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from rdpy) (0.4.8)
Requirement already satisfied: cryptography>=35.0 in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from pyopenssl->rdpy) (38.0.1)
Requirement already satisfied: pyasn1-modules in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from service_identity->rdpy) (0.2.8)
Requirement already satisfied: six in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from service_identity->rdpy) (1.16.0)
Requirement already satisfied: attrs>=19.1.0 in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from service_identity->rdpy) (22.1.0)
Requirement already satisfied: incremental>=21.3.0 in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from twisted->rdpy) (21.3.0)
Requirement already satisfied: hyperlink>=17.1.1 in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from twisted->rdpy) (21.0.0)
Requirement already satisfied: typing-extensions>=3.6.5 in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from twisted->rdpy) (4.3.0)
Requirement already satisfied: zope.interface>=4.4.2 in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from twisted->rdpy) (5.4.0)
Requirement already satisfied: constantly>=15.1 in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from twisted->rdpy) (15.1.0)
Requirement already satisfied: Automat>=0.8.0 in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from twisted->rdpy) (20.2.0)
Requirement already satisfied: cffi>=1.12 in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from cryptography>=35.0->pyopenssl->rdpy) (1.15.1)
Requirement already satisfied: idna>=2.5 in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from hyperlink>=17.1.1->twisted->rdpy) (3.4)
Requirement already satisfied: setuptools in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from zope.interface>=4.4.2->twisted->rdpy) (65.3.0)
Requirement already satisfied: pycparser in /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages (from cffi>=1.12->cryptography>=35.0->pyopenssl->rdpy) (2.21)
Building wheels for collected packages: rdpy
  Building wheel for rdpy (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [69 lines of output]
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.macosx-12-arm64-cpython-310
      creating build/lib.macosx-12-arm64-cpython-310/rdpy
      copying rdpy/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/rss.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/error.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/log.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/scancode.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/type.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/filetimes.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/layer.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/const.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/security
      copying rdpy/security/rsa_wrapper.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/security
      copying rdpy/security/pyDes.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/security
      copying rdpy/security/x509.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/security
      copying rdpy/security/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/security
      copying rdpy/security/rc4.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/security
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol
      copying rdpy/protocol/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/lic.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/tpkt.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/sec.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/rdp.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/x224.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      copying rdpy/protocol/rdp/pdu/order.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      copying rdpy/protocol/rdp/pdu/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      copying rdpy/protocol/rdp/pdu/layer.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      copying rdpy/protocol/rdp/pdu/data.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      copying rdpy/protocol/rdp/pdu/caps.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/nla
      copying rdpy/protocol/rdp/nla/ntlm.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/nla
      copying rdpy/protocol/rdp/nla/cssp.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/nla
      copying rdpy/protocol/rdp/nla/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/nla
      copying rdpy/protocol/rdp/nla/sspi.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/nla
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      copying rdpy/protocol/rdp/t125/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      copying rdpy/protocol/rdp/t125/mcs.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      copying rdpy/protocol/rdp/t125/ber.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      copying rdpy/protocol/rdp/t125/gcc.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      copying rdpy/protocol/rdp/t125/per.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rfb
      copying rdpy/protocol/rfb/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rfb
      copying rdpy/protocol/rfb/rfb.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rfb
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/ui
      copying rdpy/ui/qt4.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/ui
      copying rdpy/ui/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/ui
      copying rdpy/ui/view.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/ui
      running build_ext
      building 'rle' extension
      creating build/temp.macosx-12-arm64-cpython-310
      creating build/temp.macosx-12-arm64-cpython-310/ext
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/include -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c ext/rle.c -o build/temp.macosx-12-arm64-cpython-310/ext/rle.o
      ext/rle.c:945:13: error: implicit declaration of function 'Py_InitModule' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           (void) Py_InitModule("rle", rle_methods);
                  ^
      ext/rle.c:946:1: warning: non-void function does not return a value [-Wreturn-type]
      }
      ^
      1 warning and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for rdpy
  Running setup.py clean for rdpy
Failed to build rdpy
Installing collected packages: rdpy
  Running setup.py install for rdpy ... error
  error: subprocess-exited-with-error

  × Running setup.py install for rdpy did not run successfully.
  │ exit code: 1
  ╰─> [71 lines of output]
      running install
      /Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/lib/python3.10/site-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
        warnings.warn(
      running build
      running build_py
      creating build
      creating build/lib.macosx-12-arm64-cpython-310
      creating build/lib.macosx-12-arm64-cpython-310/rdpy
      copying rdpy/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/rss.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/error.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/log.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/scancode.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/type.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/filetimes.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/layer.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      copying rdpy/core/const.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/core
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/security
      copying rdpy/security/rsa_wrapper.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/security
      copying rdpy/security/pyDes.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/security
      copying rdpy/security/x509.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/security
      copying rdpy/security/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/security
      copying rdpy/security/rc4.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/security
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol
      copying rdpy/protocol/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/lic.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/tpkt.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/sec.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/rdp.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      copying rdpy/protocol/rdp/x224.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      copying rdpy/protocol/rdp/pdu/order.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      copying rdpy/protocol/rdp/pdu/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      copying rdpy/protocol/rdp/pdu/layer.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      copying rdpy/protocol/rdp/pdu/data.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      copying rdpy/protocol/rdp/pdu/caps.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/pdu
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/nla
      copying rdpy/protocol/rdp/nla/ntlm.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/nla
      copying rdpy/protocol/rdp/nla/cssp.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/nla
      copying rdpy/protocol/rdp/nla/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/nla
      copying rdpy/protocol/rdp/nla/sspi.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/nla
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      copying rdpy/protocol/rdp/t125/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      copying rdpy/protocol/rdp/t125/mcs.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      copying rdpy/protocol/rdp/t125/ber.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      copying rdpy/protocol/rdp/t125/gcc.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      copying rdpy/protocol/rdp/t125/per.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rdp/t125
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rfb
      copying rdpy/protocol/rfb/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rfb
      copying rdpy/protocol/rfb/rfb.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/protocol/rfb
      creating build/lib.macosx-12-arm64-cpython-310/rdpy/ui
      copying rdpy/ui/qt4.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/ui
      copying rdpy/ui/__init__.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/ui
      copying rdpy/ui/view.py -> build/lib.macosx-12-arm64-cpython-310/rdpy/ui
      running build_ext
      building 'rle' extension
      creating build/temp.macosx-12-arm64-cpython-310
      creating build/temp.macosx-12-arm64-cpython-310/ext
      clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk -I/Users/etomarat/Library/Caches/pypoetry/virtualenvs/nbki-reporter-cIhFgnC6-py3.10/include -I/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c ext/rle.c -o build/temp.macosx-12-arm64-cpython-310/ext/rle.o
      ext/rle.c:945:13: error: implicit declaration of function 'Py_InitModule' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
           (void) Py_InitModule("rle", rle_methods);
                  ^
      ext/rle.c:946:1: warning: non-void function does not return a value [-Wreturn-type]
      }
      ^
      1 warning and 1 error generated.
      error: command '/usr/bin/clang' failed with exit code 1
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> rdpy

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

Can you suggest how to solve the problem? PS: I want to use rdpy only as a protocol library

Konstantinsolkin commented 1 year ago

Did you solve it?

etomarat commented 1 year ago

@Konstantinsolkin нет. Кажется эта либа вообще для python 2.x 🙃

Konstantinsolkin commented 1 year ago

@Konstantinsolkin нет. Кажется эта либа вообще для python 2.x 🙃

Да. Может есть какие-то альтернативные либы? А то я не могу найти(

etomarat commented 1 year ago

@Konstantinsolkin нет. Кажется эта либа вообще для python 2.x 🙃

Да. Может есть какие-то альтернативные либы? А то я не могу найти(

Я тоже ничего не нашёл. Решил на js делать, вот с этой либой https://github.com/citronneur/node-rdpjs , но в работе ещё не испытывал.

etomarat commented 1 year ago

@Konstantinsolkin нет. Кажется эта либа вообще для python 2.x 🙃

Да. Может есть какие-то альтернативные либы? А то я не могу найти(

Вообще тут есть ветка python3, но я её только увидел и собирать не пробовал https://github.com/citronneur/rdpy/tree/python3

etomarat commented 1 year ago

@Konstantinsolkin я в итоге сделал свой велосипед. Не для всего подойдёт конечно, но мои проблемы решило: https://github.com/etomarat/rdp-manipulations