Python error: OSError: [WinError 193] %1 is not a valid Win32 application

前端 未结 1 1792
小鲜肉
小鲜肉 2021-01-28 22:53

After using Anaconda Navigator to update some packages (numpy, matplotlib, ...) and Spyder; my code using these packages no longer works and gives error on import.

相关标签:
1条回答
  • 2021-01-28 23:13

    After a couple of nights, the following worked for me (hopefully it may be useful to others having the same problem):

    In an Ipython environment, typing:

    In [1]: import numpy
    

    gave the error as shown above. So I did the following:

    In [2]: pip uninstall numpy
    

    getting some lines of code and confirming that numpy is being removed. After that I tried:

    In [3]: import numpy
    

    No errors and everything seems to work! (Did not do any install in between!) As if during upgrading some packages before, a double version of numpy was being installed and causing the error log as shown above.

    Exactly the same procedure worked for Matplotlib as well (uninstall and not reinstalling) made it work. Hope this is helpful.

    0 讨论(0)
提交回复
热议问题