Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/350.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Python 如何处理;无法导出初始化“初始化:符号未定义”;_Python_Gcc_Mingw32 - Fatal编程技术网

Python 如何处理;无法导出初始化“初始化:符号未定义”;

Python 如何处理;无法导出初始化“初始化:符号未定义”;,python,gcc,mingw32,Python,Gcc,Mingw32,我打算在我的64位windows上安装python包“wheezy.template”。 下面是$pip安装wheezy.template$后显示的内容。如何解决 building 'wheezy.template.utils' extension C:\anaconda\MinGW\bin\gcc.exe -DMS_WIN64 -mdll -O -Wall -IC:\Anaconda\include -IC:\Anaconda\PC -c src\wheezy\template\utils.

我打算在我的64位windows上安装python包“wheezy.template”。 下面是$pip安装wheezy.template$后显示的内容。如何解决

building 'wheezy.template.utils' extension

C:\anaconda\MinGW\bin\gcc.exe -DMS_WIN64 -mdll -O -Wall -IC:\Anaconda\include -IC:\Anaconda\PC -c src\wheezy\template\utils.c -o build\temp.win-amd64-2.7\Release\src\wheezy\template\utils.o

src\wheezy\template\utils.c: In function '__Pyx_RaiseArgtupleInvalid':

src\wheezy\template\utils.c:2100:18: warning: unknown conversion type character 'z' in format [-Wformat]

src\wheezy\template\utils.c:2100:18: warning: format '%s' expects argument of type 'char *', but argument 5 has type 'Py_ssize_t' [-Wformat]

src\wheezy\template\utils.c:2100:18: warning: unknown conversion type character 'z' in format [-Wformat]

src\wheezy\template\utils.c:2100:18: warning: too many arguments for format [-Wformat-extra-args]

writing build\temp.win-amd64-2.7\Release\src\wheezy\template\utils.def

C:\anaconda\MinGW\bin\gcc.exe -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\src\wheezy\template\utils.o build\temp.win-amd64-2.7\Release\src\wheezy\template\utils.def -LC:\Anaconda\libs -LC:\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\wheezy\template\utils.pyd

building 'wheezy.template.__init__' extension

C:\anaconda\MinGW\bin\gcc.exe -DMS_WIN64 -mdll -O -Wall -IC:\Anaconda\include -IC:\Anaconda\PC -c src\wheezy\template\__init__.c -o build\temp.win-amd64-2.7\Release\src\wheezy\template\__init__.o

writing build\temp.win-amd64-2.7\Release\src\wheezy\template\__init__.def

C:\anaconda\MinGW\bin\gcc.exe -DMS_WIN64 -shared -s build\temp.win-amd64-2.7\Release\src\wheezy\template\__init__.o build\temp.win-amd64-2.7\Release\src\wheezy\template\__init__.def -LC:\Anaconda\libs -LC:\Anaconda\PCbuild\amd64 -lpython27 -lmsvcr90 -o build\lib.win-amd64-2.7\wheezy\template\__init__.pyd


Cannot export init_init_: symbol not defined

collect2.exe: error: ld returned 1 exit status

error: command 'gcc' failed with exit status 1 
这是一个有趣的错误,因为根据文档和源代码,wheezy.template是用Python编写的,而不是用C编写的。但我可以确认,在我的Linux系统上,
pip install wheezy.template
找到一个parser.C进行编译(尽管它成功编译,所以我不能复制您的确切错误)。我使用pip的--download cache选项查看了pip实际下载的源归档文件,其中没有C文件。似乎没有任何理由认为安装它应该运行gcc,但它确实运行了。