为什么';Spyder是否遵守我的IPython配置文件?
在《Anaconda》的IPython 4.2.0和Spyder 2.3.9中,这一点过去是有效的,但现在不行了。啊 如果我得到IPython配置,它看起来是正确的,好像它正确地读取了文件:为什么';Spyder是否遵守我的IPython配置文件?,python,numpy,ipython,anaconda,spyder,Python,Numpy,Ipython,Anaconda,Spyder,在《Anaconda》的IPython 4.2.0和Spyder 2.3.9中,这一点过去是有效的,但现在不行了。啊 如果我得到IPython配置,它看起来是正确的,好像它正确地读取了文件: get_ipython().config Out[1]: {'IPCompleter': {'greedy': True}, 'IPKernelApp': {'exec_lines': ['%pylab qt']}, 'InlineBackendConfig': {}, 'InteractiveSh
get_ipython().config
Out[1]:
{'IPCompleter': {'greedy': True},
'IPKernelApp': {'exec_lines': ['%pylab qt']},
'InlineBackendConfig': {},
'InteractiveShell': {'xmode': 'Plain'},
'InteractiveShellApp': {'exec_lines': ['from __future__ import division',
'from __future__ import print_function',
'from __future__ import with_statement',
'from numpy import set_printoptions',
'set_printoptions(suppress=True, precision=4)',
'from sympy import init_printing',
'init_printing(forecolor="White")'],
'pylab': 'auto'},
'StoreMagics': {'autorestore': True},
'ZMQInteractiveShell': {'autocall': 0, 'banner1': ''}}
所以它应该有未来的分裂和numpy抑制,但实际上没有:
division
Out[1]: _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)
4/5
Out[2]: 0
np.get_printoptions()
Out[3]:
{'edgeitems': 3,
'formatter': None,
'infstr': 'inf',
'linewidth': 75,
'nanstr': 'nan',
'precision': 8,
'suppress': False,
'threshold': 1000}
eps = np.finfo(float).eps; x = np.arange(4.); x**2 - (x + eps)**2
Out[4]:
array([ -4.93038066e-32, -4.44089210e-16, 0.00000000e+00,
0.00000000e+00])
这就是它应该做的:
from __future__ import division
division
Out[2]: _Feature((2, 2, 0, 'alpha', 2), (3, 0, 0, 'alpha', 0), 8192)
4/5
Out[3]: 0.8
np.set_printoptions(suppress=True)
eps = np.finfo(float).eps; x = np.arange(4.); x**2 - (x + eps)**2
Out[5]: array([-0., -0., 0., 0.])
np.get_printoptions()
Out[6]:
{'edgeitems': 3,
'formatter': None,
'infstr': 'inf',
'linewidth': 75,
'nanstr': 'nan',
'precision': 8,
'suppress': True,
'threshold': 1000}
常规IPython正常工作(C:\Anaconda2\python.exe C:\Anaconda2\cwp.py C:\Anaconda2“C:/Anaconda2/python.exe”“C:/Anaconda2/Scripts/IPython script.py”
)
Jupyter QTConsole工作正常(
C:\Anaconda2\pythonw.exe C:\Anaconda2\cwp.py C:\Anaconda2“C:/Anaconda2/pythonw.exe”“C:/Anaconda2/Scripts/Jupyter QTConsole script.py”
)我也不确定是什么问题
我也有同样的问题
但当我卸载anaconda及其python部分时,我的问题得到了解决
当然,我保存了设置和个人资料等
并重新安装
希望这有帮助,如果这是一个选项的话它与spyder有关吗?@PeterBrittain没有,但这是一个很好的解决办法!一个可能令人恼火的答案(没有人想重新安装)可能是在某些东西上。水蟒4.2被虫子弄得千疮百孔。我参与了github发布的问题,他们非常善于调查这些问题,尽管我确信他们可能必须根据计划发布和其他人的问题确定优先级。巨蟒4.3.1现在出局了。您可能想尝试升级,看看问题是否得到解决。您还可以单击指向spyder bug的链接,并将其跟踪到项目以发布您的问题以寻求帮助。还可以尝试其他一些方法:conda update conda和conda update anaconda来更新这些组件。然后conda更新spyder,但请确保按此顺序更新,否则可能会损坏spyder,然后发现它无法工作。