Re: >>> %matplotlib inline results in SyntaxError: invalid syntax

2023-12-25 Thread MRAB via Python-list
On 2023-12-25 19:53, Alan Gauld via Python-list wrote: On 25/12/2023 05:34, geetanajali homes via Python-list wrote: import numpy as np import pandas as pd import random import matplotlib.pyplot as plt %matplotlib inline I get an error on the last line. I am running this code in Idle

Re: >>> %matplotlib inline results in SyntaxError: invalid syntax

2023-12-25 Thread Chris Angelico via Python-list
On Tue, 26 Dec 2023 at 07:27, Chris Grace via Python-list wrote: > I'd also recommend a newer version of python. Python 3.4 reached end of > life almost 5 years ago. Uhh, putting this in perspective... until a spammer revived the thread just now, it was asked, answered, and finished with, all

Re: >>> %matplotlib inline results in SyntaxError: invalid syntax

2023-12-25 Thread Chris Grace via Python-list
"%matplotlib inline" is a magic command that changes how plots render when working with IPython. Read more here: https://stackoverflow.com/a/43028034 The article you linked assumes you are working in an IPython shell, not IDLE. This is common in the data science world. You may already have

Re: >>> %matplotlib inline results in SyntaxError: invalid syntax

2023-12-25 Thread Alan Gauld via Python-list
On 25/12/2023 05:34, geetanajali homes via Python-list wrote: >> import numpy as np >> import pandas as pd >> import random >> import matplotlib.pyplot as plt >> %matplotlib inline >> >> I get an error on the last line. I am running this code in Idle Python >> 3.4.4 Shell... Python names

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-25 Thread Mike Dewhirst via Python-list
Well spotted Chris. 4 was a generalisation based on my own circumstances.However, I'm not wrong about Microsoft motivationsM--(Unsigned mail from my phone) Original message From: Chris Angelico via Python-list Date: 25/12/23 15:57 (GMT+10:00) To: Michael Torrie via

Re: >>> %matplotlib inline results in SyntaxError: invalid syntax

2023-12-25 Thread geetanajali homes via Python-list
On Friday 29 January 2016 at 12:34:47 UTC+5:30, Mike S wrote: > I have installed Python 3.4.4 on XPSP3 and am trying to work my way > through this tutorial. > > A Complete Tutorial on Ridge and Lasso Regression in Python >

Re: Python 3.12.1, Windows 11: shebang line #!/usr/bin/env python3 doesn't work any more

2023-12-25 Thread rbowman via Python-list
On Sun, 24 Dec 2023 22:55:34 +, Barry wrote: >> On 24 Dec 2023, at 00:54, rbowman via Python-list >> wrote: >> >> Does that work with virtualenv or conda? I'm slowly getting up to speed >> with those. > > Conda is its own thing, not need for py.exe. > > Once you have created the venv you