0

I'm having an issue installing a dependency called keras-retinanet.

I'm having a hard time making out what the error is telling me.

$ pip install keras-retinanet==0.5.0
Collecting keras-retinanet==0.5.0
  Using cached keras-retinanet-0.5.0.tar.gz (59 kB)
    ERROR: Command errored out with exit status 1:
     command: 'c:\users\nicol\appdata\local\programs\python\python37\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\Nicol\\AppData\\Local\\Temp\\pip-install-v20g1wmz\\keras-retinanet\\setup.py'"'"'; __file__='"'"'C:\\Users\\Nicol\\AppData\\Local\\Temp\\pip-install-v20g1wmz\\keras-retinanet\\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 'C:\Users\Nicol\AppData\Local\Temp\pip-install-v20g1wmz\keras-retinanet\pip-egg-info'
         cwd: C:\Users\Nicol\AppData\Local\Temp\pip-install-v20g1wmz\keras-retinanet\
    Complete output (11 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\Nicol\AppData\Local\Temp\pip-install-v20g1wmz\keras-retinanet\setup.py", line 3, in <module>
        import numpy as np
      File "C:\Users\Nicol\AppData\Roaming\Python\Python37\site-packages\numpy\__init__.py", line 140, in <module>
        from . import _distributor_init
      File "C:\Users\Nicol\AppData\Roaming\Python\Python37\site-packages\numpy\_distributor_init.py", line 26, in <module>
        WinDLL(os.path.abspath(filename))
      File "c:\users\nicol\appdata\local\programs\python\python37\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.

Aditional info:

Python version :

Python 3.7.6 (tags/v3.7.6:43364a7ae0, Dec 19 2019, 00:42:30) [MSC v.1916 64 bit (AMD64)]

pip version

pip-20.0.2
phd
  • 82,685
  • 13
  • 120
  • 165
Nicolasome
  • 341
  • 1
  • 3
  • 21
  • https://stackoverflow.com/q/55732949/7976758 – phd Feb 16 '20 at 12:30
  • https://stackoverflow.com/search?q=%5Bpython%5D+OSError+%22WinError+193%22+%22%251%22+is+not+a+valid+Win32+application – phd Feb 16 '20 at 12:31

2 Answers2

1

pip uninstall numpy

pip install numpy

did the trick

Nicolasome
  • 341
  • 1
  • 3
  • 21
0

If you are getting this error in the ubuntu 20.04 LTS system it's because we haven't installed anaconda in the system. After Installing anaconda it will start working.

cd /tmp

curl -O https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh

bash Anaconda3-2021.11-Linux-x86_64.sh

follow the screen...

note: make sure python and pip are installed in the system.