简体   繁体   English

Theano + Windows + CUDA,在使用CMD时可以很好地工作,但是在日食中出现错误的错误提示(警告C4819)

[英]Theano + Windows + CUDA, work well using CMD, but encoutered error in eclipse (warning C4819)

I am working with ` Windows + CUDA 6.5 + VS2010 + Python2.7 + Theano. 我正在使用Windows + CUDA 6.5 + VS2010 + Python2.7 + Theano。 My Python scripts works well when using command line, say: 使用命令行时,我的Python脚本运行良好,例如:

python DDI_convnet.py

and I get results as: 我得到的结果是:

通过CMD 1

通过了CMD 2

However, when I run the same Python scripts in Eclipse , I get a lot of errors: 但是,当我在Eclipse运行相同的Python scripts时,会出现很多错误:

Eclipse 1中的错误

Eclipse 2中的错误

Eclipse 3中的错误

I think this is probably due to the difference of character Map of Eclipse and CMD , because the warning C4819 implies that a lot of .h files are not parsed correctly. 我认为这可能是由于EclipseCMD字符映射的不同所致,因为warning C4819暗示很多.h文件未正确解析。 How to fix it? 如何解决?

I find the answer myself. 我自己找到答案。 This is because, I installed Microsoft C++ for Python first, and then installed VS2010. 这是因为,我先为Python安装了Microsoft C ++,然后又安装了VS2010。 The environment variable of Eclipse can only be updated after restarting windows. Eclipse的环境变量只能在重新启动Windows之后进行更新。

However, after I restart windows, the problem changes, not warning C4819 any more, it began to report errors like "unresolved external ...", which is mainly due to some DLLs or libs are not included correctly by Eclipse. 但是,重新启动Windows之后,问题发生了变化,不再警告C4819,它开始报告诸如“ unresolved external ...”之类的错误,这主要是由于Eclipse未正确包含某些DLL或库。

Finally, I decide to change my IDE to PyCharm. 最后,我决定将我的IDE更改为PyCharm。 Everything goes well so far. 到目前为止一切都很好。

I guess your system setting of 'system locale' is Chinese. 我猜您的“系统区域设置”的系统设置是中文。 Change it to English could possibly fix this problem. 将其更改为英语可能可以解决此问题。

https://stackoverflow.com/a/37871883/3148107 https://stackoverflow.com/a/37871883/3148107

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM