spyder-ide / spyder

Official repository for Spyder - The Scientific Python Development Environment
https://www.spyder-ide.org
MIT License
8.1k stars 1.57k forks source link

Cannot display sympy symbol in console #11014

Open david-cortes opened 4 years ago

david-cortes commented 4 years ago

Steps to reproduce:

Expected behavior: should display an "x" in the console, ideally with math font.

Actual behavior: spyder gets stuck there at that command, which never finishes. Sometimes, it keeps using a full CPU core's resources.

Setup: Spyder 4.0.0, installed from conda, running on Windows 10, Python 3.7.3, sympy 1.4. conda_list.txt

goanpeca commented 4 years ago

Can you reproduce @impact27 @jnsebgosselin ?

jnsebgosselin commented 4 years ago

Can you reproduce @impact27 @jnsebgosselin ?

yes

impact27 commented 4 years ago

Not on mac:

In [1]: from sympy import *

In [2]: symbols('x')
Out[2]: 
x

In [3]: 
david-cortes commented 4 years ago

Also working fine on linux.

bcolsen commented 4 years ago

I cannot reproduce in linux with latest 4.x. The x shows up but it's black on black with the dark theme.

@david-cortes Can you try this with opening a New special console->sympy console and entering x there?

david-cortes commented 4 years ago

@bcolsen : Same thing, also gets stuck at the command that is supposed to show some symbol.

skilz80 commented 4 years ago

I'm having a similar issue with Spyder trying to use Sympy to display automatic symbolic python...

I'm running this in Windows 7-64bit and I'm following their built-in tutorial: Preferences > IPython console > Advanced Settings > Use symbolic math I then make sure that box is checked... Then I restart the IPython console's kernel...

It displays:

Python 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)] Type "copyright", "credits" or "license" for more information.

IPython 6.4.0 -- An enhanced Interactive Python.

These commands were executed: from future import division from sympy import * x, y, z, t = symbols('x y z t') k, m, n = symbols('k m n', integer=True) f, g, h = symbols('f g h', cls=Function)

Warning: pylab (numpy and matplotlib) and symbolic math (sympy) are both enabled at the same time. Some pylab functions are going to be overrided by the sympy module (e.g. plot)

Before the In [1]: input line...

I then type in:

In [1]: expr = (x + y) ** 3

but it gives me this error message:

Traceback (most recent call last):

File "", line 1, in expr = (x + y) ** 3

NameError: name 'x' is not defined

ccordoba12 commented 4 years ago

@skilz80, please update to our latest version (4.1.3) with these commands

conda update anaconda
conda install spyder=4.1.3

and try again.