简体   繁体   English

不能使用SPYDER(anaconda)

[英]Can't use SPYDER (anaconda)

I've installed anaconda for spyder ide. 我已经安装了spide ide的anaconda。 But I had multiple problems. 但是我有多个问题。

runfile('C:/Users/Berk DOĞUŞ/Spyder Projects/DogrusalRegresyon.py', wdir='C:/Users/Berk DOĞUŞ/Spyder Projects') Traceback (most recent call last): runfile('C:/ Users / BerkDOĞUŞ/ Spyder Projects / DogrusalRegresyon.py',wdir ='C:/ Users / BerkDOĞUŞ/ Spyder Projects')追溯(最近一次调用):

File "", line 1, in runfile('C:/Users/Berk DOĞUŞ/Spyder Projects/DogrusalRegresyon.py', wdir='C:/Users/Berk DOĞUŞ/Spyder Projects') 文件“”,运行文件中的第1行('C:/ Users / BerkDOĞUŞ/ Spyder Projects / DogrusalRegresyon.py',wdir ='C:/ Users / BerkDOĞUŞ/ Spyder Projects')

File "C:\\AConda\\lib\\site-packages\\spyder\\utils\\site\\sitecustomize.py", line 705, in runfile execfile(filename, namespace) 文件“ C:\\ AConda \\ lib \\ site-packages \\ spyder \\ utils \\ site \\ sitecustomize.py”,第705行,位于运行文件execfile(文件名,名称空间)中

File "C:\\AConda\\lib\\site-packages\\spyder\\utils\\site\\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace) 文件“ C:\\ AConda \\ lib \\ site-packages \\ spyder \\ utils \\ site \\ sitecustomize.py”,第102行,位于execfile exec(编译(f.read(),文件名,“ exec”),名称空间)中

File "C:/Users/Berk DOĞUŞ/Spyder Projects/DogrusalRegresyon.py", line 13, in import pandas as pd 文件“ C:/ Users / BerkDOĞUŞ/ Spyder Projects / DogrusalRegresyon.py”,第13行,作为pd导入熊猫

File "C:\\Users\\Berk DOĞUŞ\\AppData\\Roaming\\Python\\Python36\\site-packages\\pandas__init__.py", line 35, in "the C extensions first.".format(module)) 文件“ C:\\ Users \\ BerkDOĞUŞ\\ AppData \\ Roaming \\ Python \\ Python36 \\ site-packages \\ pandas__init __。py”,第35行,位于“ C扩展名优先”中。.format(module)

ImportError: C extension: No module named 'pandas._libs.tslib' not built. ImportError:C扩展:没有构建名为“ pandas._libs.tslib”的模块。 If you want to import pandas from the source directory, you may need to run 'python setup.py build_ext --inplace --force' to build the C extensions first. 如果要从源目录导入熊猫,可能需要运行“ python setup.py build_ext --inplace --force”以首先构建C扩展。

I don't understand where I am making a mistake? 我不明白自己在哪里犯错? I tried the answer here but it has led to a different issue: 我在这里尝试了答案但导致了另一个问题:

runfile('C:/Users/Berk DOĞUŞ/Spyder Projects/DogrusalRegresyon.py', wdir='C:/Users/Berk DOĞUŞ/Spyder Projects') Traceback (most recent call last): runfile('C:/ Users / BerkDOĞUŞ/ Spyder Projects / DogrusalRegresyon.py',wdir ='C:/ Users / BerkDOĞUŞ/ Spyder Projects')追溯(最近一次调用):

File "", line 1, in runfile('C:/Users/Berk DOĞUŞ/Spyder Projects/DogrusalRegresyon.py', wdir='C:/Users/Berk DOĞUŞ/Spyder Projects') 文件“”,运行文件中的第1行('C:/ Users / BerkDOĞUŞ/ Spyder Projects / DogrusalRegresyon.py',wdir ='C:/ Users / BerkDOĞUŞ/ Spyder Projects')

File "C:\\AConda\\lib\\site-packages\\spyder\\utils\\site\\sitecustomize.py", line 705, in runfile execfile(filename, namespace) 文件“ C:\\ AConda \\ lib \\ site-packages \\ spyder \\ utils \\ site \\ sitecustomize.py”,第705行,位于运行文件execfile(文件名,名称空间)中

File "C:\\AConda\\lib\\site-packages\\spyder\\utils\\site\\sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace) 文件“ C:\\ AConda \\ lib \\ site-packages \\ spyder \\ utils \\ site \\ sitecustomize.py”,第102行,位于execfile exec(编译(f.read(),文件名,“ exec”),名称空间)中

File "C:/Users/Berk DOĞUŞ/Spyder Projects/DogrusalRegresyon.py", line 12, in import pandas as pd 文件“ C:/ Users / BerkDOĞUŞ/ Spyder Projects / DogrusalRegresyon.py”,第12行,作为pd导入熊猫

File "C:\\AConda\\lib\\site-packages\\pandas__init__.py", line 40, in import pandas.core.config_init 导入pandas.core.config_init中的第40行,文件“ C:\\ AConda \\ lib \\ site-packages \\ pandas__init __。py”

File "C:\\AConda\\lib\\site-packages\\pandas\\core\\config_init.py", line 12, in import pandas.core.config as cf 以cf导入pandas.core.config中第12行的文件“ C:\\ AConda \\ lib \\ site-packages \\ pandas \\ core \\ config_init.py”

File "C:\\AConda\\lib\\site-packages\\pandas\\core\\config.py", line 57, in import pandas.compat as compat 导入pandas.compat中的文件“ C:\\ AConda \\ lib \\ site-packages \\ pandas \\ core \\ config.py”,行为compat

AttributeError: module 'pandas' has no attribute 'compat' AttributeError:模块“ pandas”没有属性“ compat”

Thanks for roganjosh. 感谢roganjosh。 Just deleted the python. 刚刚删除了python。

There is another error like : 还有另一个错误,例如:

Ok guys thanks for everything. 好的,谢谢你所做的一切。 Found the solution. 找到了解决方案。 First of all if you have python and Anaconda at same the time, delete the folder of python. 首先,如果您同时拥有python和Anaconda,请删除python文件夹。 Like Here 像这儿

Then listen roganjosh's advice and uninstal-reinstall pandas lib using conda . 后来听roganjosh的意见,并UNINSTAL,重新安装的lib使用熊猫conda Then turn of and turn on spyder. 然后打开并打开间谍。 That's all. 就这样。 Problem solved. 问题解决了。

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

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