radareorg / radare2-r2pipe

Access radare2 via pipe from any programming language!
388 stars 99 forks source link

`pip install r2pipe` fails #105

Closed benhall-7 closed 5 years ago

benhall-7 commented 5 years ago

python: 3.7.4 pip: 19.2.3 Attempted on Windows, command line output is the following

C:\Users\Breakfast>pip install r2pipe
Collecting r2pipe
  Using cached https://files.pythonhosted.org/packages/43/11/10bc2eab6f27f553e9afe3bdd6380a4f3874187493106b7887d1c4b29e0e/r2pipe-1.4.1.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\breakfast\appdata\local\programs\python\python37-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\BREAKF~1\\AppData\\Local\\Temp\\pip-install-gdhve1lw\\r2pipe\\setup.py'"'"'; __file__='"'"'C:\\Users\\BREAKF~1\\AppData\\Local\\Temp\\pip-install-gdhve1lw\\r2pipe\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info
         cwd: C:\Users\BREAKF~1\AppData\Local\Temp\pip-install-gdhve1lw\r2pipe\
    Complete output (15 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\BREAKF~1\AppData\Local\Temp\pip-install-gdhve1lw\r2pipe\setup.py", line 2, in <module>
        import r2pipe
      File "C:\Users\BREAKF~1\AppData\Local\Temp\pip-install-gdhve1lw\r2pipe\r2pipe\__init__.py", line 38, in <module>
        from .open_sync import open
      File "C:\Users\BREAKF~1\AppData\Local\Temp\pip-install-gdhve1lw\r2pipe\r2pipe\open_sync.py", line 14, in <module>
        from .open_base import OpenBase, get_radare_path
      File "C:\Users\BREAKF~1\AppData\Local\Temp\pip-install-gdhve1lw\r2pipe\r2pipe\open_base.py", line 22, in <module>
        from .native import RCore
      File "C:\Users\BREAKF~1\AppData\Local\Temp\pip-install-gdhve1lw\r2pipe\r2pipe\native.py", line 23, in <module>
        lib = WinDLL(lib_name)
      File "c:\users\breakfast\appdata\local\programs\python\python37-32\lib\ctypes\__init__.py", line 364, in __init__
        self._handle = _dlopen(self._name, mode)
    OSError: [WinError 193] %1 is not a valid Win32 application
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
a1ext commented 5 years ago

Hi @BenHall-7, it seems you have python and radare2 of different bitness. If you have radare2 64-bit, please use python 64-bit

benhall-7 commented 5 years ago

@a1ext You were right, that fixed it! Thank you, I'll close the issue then