【问题标题】:OSError: [WinError 193] %1 is not a valid Win32 application running python codeOSError: [WinError 193] %1 不是运行 python 代码的有效 Win32 应用程序
【发布时间】:2020-10-28 09:04:55
【问题描述】:

我正在尝试使用 Python 3.8.6 运行 python 代码,但出现以下错误:

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

我无法解决此错误。

我的代码如下:

import os
print(os.getcwd())

import pandas as pd
import numpy as np

dfTextonly = pd.DataFrame(pd.read_csv('internal_all_txt.csv', low_memory=False, header=1))
dfTextonly = dfTextonly[['Address','Status Code', 'Word Count' ,'Outlinks', 'Unique Outlinks', 'Inlinks', 'Unique Inlinks',"Canonical Link Element 1"]].copy()
dfJS = pd.DataFrame(pd.read_csv('internal_all_js.csv', low_memory=False, header=1))
dfJS = dfJS[['Address','Status Code', 'Word Count', 'Outlinks', 'Unique Outlinks', 'Inlinks', 'Unique Inlinks',"Canonical Link Element 1"]].copy()
df = pd.merge(dfTextonly, dfJS, left_on='Address', right_on='Address', how='outer')

df['Diff Wordcount'] = df['Word Count_y'] - df['Word Count_x']
df['Diff Outlinks'] = df['Outlinks_y'] - df['Outlinks_x']
df['Diff Unique Outlinks'] = df['Unique Outlinks_y'] - df['Unique Outlinks_x']
df['Diff Inlinks'] = df['Unique Inlinks_y'] - df['Unique Inlinks_x']
df["Canonicals are equal"] = np.where((df["Canonical Link Element 1_y"] == df["Canonical Link Element 1_x"]), "yes", "no")

df.to_excel("rendering-test.xlsx")

关于为什么会这样的任何想法?谢谢!

【问题讨论】:

    标签: python python-3.8


    【解决方案1】:

    所以我无法添加评论,

    尝试卸载 numpy.有时它有多个版本。

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

    【讨论】:

      猜你喜欢
      • 2014-10-28
      • 2020-07-28
      • 1970-01-01
      • 1970-01-01
      • 2020-02-19
      • 1970-01-01
      • 1970-01-01
      • 2022-08-10
      • 2021-05-04
      相关资源
      最近更新 更多