无法打开包含文件:'io.h':没有这样的文件或目录 [英] Cannot open include file: 'io.h': No such file or directory

查看:538
本文介绍了无法打开包含文件:'io.h':没有这样的文件或目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图使用Cython编译一个简单的.pyx文件。

  print( hello)

这是我的setup.py:

  from distutils.core从Cython导入设置
。构建导入cythonize

setup(
ext_modules = cythonize( hello.pyx)

然后我运行命令。

  python setup.py build_ext --inplace 

显示错误下面。我一直在努力寻找它,但没有发现任何帮助。


 运行build_ext 
建筑'hello'扩展名
C:\程序文件(x86)\ Microsoft Visual Studio 14.0\VC\BIN\cl.exe / c / nologo / Ox / W3 / GL / DNDEBUG / MD
-IC:\用户\Jackie\AppData\Local\Continuum\Anaconda3\include -IC:\用户\Jackie\AppData\Local\Continuum\Anaconda3\include -IC:\程序文件(x86)\Microsoft Visual Studio 14.0\VC\INCLUDE
-IC:\程序文件(x86)\Windows Kits\10\include\ \wdf\ucrt
-IC:\程序文件(x86)\Windows套件\NETFXSDK\4.6\include\um
-IC:\程序文件(x86)\Windows套件\8.1\include\共享的
-IC:\程序文件(x86)\Windows套件\8.1\include\共享的 -IC:\Program Files \程序
文件(x86)\Windows套件\8.1\include\winrt /Tchello.c
/Fobuild\temp.win32-3.5\发行\hello.obj
hello.c
c:\users\jackie\appdata\local\continuum\anaconda3\include\pyconfig.h( 68):
致命错误C1083:无法打开包含文件:'io.h':没有这样的文件或
目录
错误:命令'C:\\Program Files(x86) \\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe'失败,退出状态为2


有人可以帮我解决错误吗?



我有Anaconda3 4.1.1 ,Python 3.5和Visual Studio Express 2015。

解决方案

下载


I was trying to compile a simple .pyx file using Cython.

print("hello")

Here's my setup.py:

from distutils.core import setup
from Cython.Build import cythonize

setup(
    ext_modules = cythonize("hello.pyx")
)

Then I run the command.

python setup.py build_ext --inplace

The error is shown below. I've struggled on googling it but found nothing helpful.

    running build_ext
    building 'hello' extension
    C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\BIN\cl.exe /c /nologo /Ox /W3 /GL /DNDEBUG /MD
-IC:\Users\Jackie\AppData\Local\Continuum\Anaconda3\include -IC:\Users\Jackie\AppData\Local\Continuum\Anaconda3\include "-IC:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\INCLUDE"
"-IC:\Program Files (x86)\Windows Kits\10\include\wdf\ucrt"
"-IC:\Program Files (x86)\Windows Kits\NETFXSDK\4.6\include\um"
"-IC:\Program Files (x86)\Windows Kits\8.1\include\shared"
"-IC:\Program Files (x86)\Windows Kits\8.1\include\um" "-IC:\Program
Files (x86)\Windows Kits\8.1\include\winrt" /Tchello.c
/Fobuild\temp.win32-3.5\Release\hello.obj  
    hello.c
    c:\users\jackie\appdata\local\continuum\anaconda3\include\pyconfig.h(68):
fatal error C1083: Cannot open include file: 'io.h': No such file or
directory  
    error: command 'C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\BIN\\cl.exe' failed with exit status 2

Can someone help me to resolve the error, please?

I have Anaconda3 4.1.1, Python 3.5, and Visual Studio Express 2015 installed.

解决方案

Download visual studio build tools and install

  1. Visual C++ Build tools core features.
  2. VC++ 2017 v141 toolset (x86,x64)
  3. Visual C++ 2017 Redistributable Update
  4. Windows 10 SDK (10.0.16299.0) for Desktop C++

这篇关于无法打开包含文件:'io.h':没有这样的文件或目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆