0

Does anybody know what is going on with this:

(tensorflow) C:\Users\Andrew>neural_style_transfer.py
Traceback (most recent call last):
  File "C:\Users\Andrew\neural_style_transfer.py", line 2, in <module>
    from keras.preprocessing.image import load_img
  File "C:\Users\Andrew\AppData\Local\Programs\Python\Python37-32\lib\site-packages\keras\__init__.py", line 3, in <module>
    from . import utils
  File "C:\Users\Andrew\AppData\Local\Programs\Python\Python37-32\lib\site-packages\keras\utils\__init__.py", line 2, in <module>
    from . import np_utils
  File "C:\Users\Andrew\AppData\Local\Programs\Python\Python37-32\lib\site-packages\keras\utils\np_utils.py", line 6, in <module>
    import numpy as np
  File "C:\Users\Andrew\Anaconda3\envs\tensorflow\Lib\site-packages\numpy\__init__.py", line 140, in <module>
    from . import _distributor_init
  File "C:\Users\Andrew\Anaconda3\envs\tensorflow\Lib\site-packages\numpy\_distributor_init.py", line 26, in <module>
    WinDLL(os.path.abspath(filename))
  File "C:\Users\Andrew\AppData\Local\Programs\Python\Python37-32\lib\ctypes\__init__.py", line 356, in __init__
    self._handle = _dlopen(self._name, mode)
OSError: [WinError 193] %1 is not a valid Win32 application

(tensorflow) C:\Users\Andrew>where python
C:\Users\Andrew\Anaconda3\envs\tensorflow\python.exe
C:\Users\Andrew\AppData\Local\Programs\Python\Python37-32\python.exe
C:\Users\Andrew\AppData\Local\Microsoft\WindowsApps\python.exe

Can anyone give me recommendations on how to fix it?

Superman
  • 135
  • 1
  • 6
  • This can help: https://stackoverflow.com/questions/55732949/python-produces-oserror-winerror-193-1-is-not-a-valid-win32-application-bu?noredirect=1#comment98144483_55732949 – Harish Vutukuri Nov 21 '19 at 07:16
  • On one of the answers, it said to use testEnv64 Venv, then call activate_this.py; where can I do this, and should I create the activate_this file? – Superman Nov 21 '19 at 07:20

0 Answers0