how to use SymPy from Windows

49 views
Skip to first unread message

Ondrej Certik

unread,
Apr 25, 2008, 7:35:50 PM4/25/08
to sy...@googlegroups.com
Hi,

I finally found time to install virtualbox on my Debian and windows +
ubuntu images on it. My plan is to figure out the steps so that anyone
with windows can start hacking on any python project (sympy) and also
how to use mercurial from windows and then document everything in our
docs.

Here is how to do it:

$ sudo apt-get install virtualbox-ose virtualbox-ose-modules-2.6.24-1-686
$ sudo modprobe vboxdrv
$ sudo vigr #add yourself into the vboxusers group
$ virtualbox

Read the user's manual at virtualbox.org. It's really that simple,
then you mount an iso image of Windows/Ubuntu and install it. It just
works.

That was the easy part. Now, how do you hack on python in windows? How
do you start python shell? I would like to have some terminal, is
there such a thing in windows?
I started the "cmd" commandline and managed to start python from that
by going to the c:\python2.5 dir and running "python.exe", but I don't
think anyone uses "cmd" for development, does he?

BTW, I had to install firefox, because IE shows a mess for this page:
http://docs.sympy.org/tutorial.html

I installed python(x,y) distrubution from pythonxy.org and that works
fine. Then I installed MinGW and MSYS from http://mingw.org/ and this
gives me some kind of reasonable terminal. However, readline support
is missing, so the interactive interpreter is not working, nor is
bin/isympy ("python bin/isympy" hangs for example).

So the only way how to start isympy that I figured out is running
"cmd", then "cd C:\Python25" and "python.exe Scripts\isympy".
Unfortunately the "cmd" terminal is really stupid for any serious
work.

Does anyone know how to fix the above problems, so that one can use a
normal terminal much like in unix?

Thanks,
Ondrej

P.S. Plotting works out of the box, that's nice.

Gael Varoquaux

unread,
Apr 25, 2008, 9:29:58 PM4/25/08
to sy...@googlegroups.com
On Sat, Apr 26, 2008 at 01:35:50AM +0200, Ondrej Certik wrote:
> I finally found time to install virtualbox on my Debian and windows +
> ubuntu images on it.

I figured all that out all ready, but I am stuck at one problem: how to
get a windows license? I do have a windows license, it came with my
computer, but it won't accept running under virtualbox.

I am not buying one!

Gaël

Vinzent Steinberg

unread,
Apr 26, 2008, 11:06:26 AM4/26/08
to sympy
Try this:

http://ipython.scipy.org/

Especially:

http://ipython.scipy.org/moin/IpythonOnWindows

People on Windows are not supposed to use any terminal, so there is
only poor (native) support for such things. I think many are using
graphical shells for Python development, like IDLE or the wxPython
shell for example.

You might be interested in this: http://sourceforge.net/projects/console

In combination with ipython + pyreadline this gives nearly Unix
feeling. ;)

Vinzent

On Apr 26, 1:35 am, "Ondrej Certik" <ond...@certik.cz> wrote:
> Hi,
>
> I finally found time to install virtualbox on my Debian and windows +
> ubuntu images on it. My plan is to figure out the steps so that anyone
> with windows can start hacking on any python project (sympy) and also
> how to use mercurial from windows and then document everything in our
> docs.
>
> Here is how to do it:
>
> $ sudo apt-get install virtualbox-ose virtualbox-ose-modules-2.6.24-1-686
> $ sudo modprobe vboxdrv
> $ sudo vigr #add yourself into the vboxusers group
> $ virtualbox
>
> Read the user's manual at virtualbox.org. It's really that simple,
> then you mount an iso image of Windows/Ubuntu and install it. It just
> works.
>
> That was the easy part. Now, how do you hack on python in windows? How
> do you start python shell? I would like to have some terminal, is
> there such a thing in windows?
> I started the "cmd" commandline and managed to start python from that
> by going to the c:\python2.5 dir and running "python.exe", but I don't
> think anyone uses "cmd" for development, does he?
>
> BTW, I had to install firefox, because IE shows a mess for this page:http://docs.sympy.org/tutorial.html
>
> I installed python(x,y) distrubution from pythonxy.org and that works
> fine. Then I installed MinGW and MSYS fromhttp://mingw.org/and this

Pierre Raybaut

unread,
Apr 27, 2008, 12:11:32 PM4/27/08
to sympy
Actually, Console 2 is already included in Python(x,y).
In version 1.1.2, you may launch an interactive console through the
start menu (Python(x,y)>Interactive consoles).

PR

On 26 avr, 17:06, Vinzent Steinberg <vinzent.steinb...@googlemail.com>
wrote:

Kirill Smelkov

unread,
Jun 20, 2008, 6:33:40 AM6/20/08
to sy...@googlegroups.com

A bit late reply is that one could try to use WINE to test SymPy on
win32 platform.

Recently I've crafted a tool to unroll development environment
(Python+NumPy+MinGW+other-extras) under WINE, and perform quick jumps
between Linux and Win32 worlds:

http://landau.phys.spbu.ru/~kirr/cgi-bin/hg.cgi/navy-wine-devtools/

you could even run ipython on win32 console and access the same SymPy
files you are currently editing under Linux

This piece of code lacks (yet) documentation, so I'll write here how to
setup it:

$ hg clone http://landau.phys.spbu.ru/~kirr/cgi-bin/hg.cgi/navy-wine-devtools/
$ cd navy-wine-devtools/

$ cd distrib/

# now we are going to download all the win32 software we need (it's kind
# of a distribution)
$ ./__fetchblobs__.sh
# ... a lot of downloading is happenning ...

# let's get back and setup WINE instance
$ cd ..
$ export WINEPREFIX=`pwd`/x.navwin32
# ^ ^ ^
# WINEPREFIX points to where our windows setup will live (and btw, you
# can have several win32 instances simultaneously)

# let's finally create win32 instance!
$ ./navy-wine-dev-install.sh
# ... a lot of things are installed and optionally compiled ...

# source handy win32-jump aliases
$ . waliases.sh

# ---- now let's get to try SymPy/win32 ----

# first clone sympy
$ hg clone http://hg.sympy.org/sympy
$ cd sympy

$ wipython # this invokes ipython from under win32, or
$ widle

and try import sympy there and other things

and as a bonus, here is how to build msi installer for sympy under Linux:

$ wpython setup.py bdist_msi

That's it.

------

And the last note -- I've got ok from my supervisor to share this, and
also we could generalize this to some general tool (at present the
needed setup is hardcoded), so if anyone is interested, let's create
separate project for this, and of course:

Patches Welcome!

--
Всего хорошего, Кирилл.

Alan Bromborsky

unread,
Jun 20, 2008, 10:55:15 AM6/20/08
to sy...@googlegroups.com
What worked for me was running XP in virtualbox on my ubuntu laptop and
then testing the python code I developed on linux in XP!

Ondrej Certik

unread,
Oct 19, 2008, 9:14:14 AM10/19/08
to sy...@googlegroups.com
On Fri, Jun 20, 2008 at 4:55 PM, Alan Bromborsky <abr...@verizon.net> wrote:
> What worked for me was running XP in virtualbox on my ubuntu laptop and
> then testing the python code I developed on linux in XP!

Yes, I use that too. Here I started a wiki how to run the latest sympy
git version on Windows:

http://wiki.sympy.org/wiki/Windows

the msysgit is really nice, it has a bash console, vim and git. Then
one installs Python and setup paths, as described on the wiki and
everything works. Thanks to our builtin testing code, one can then
just type:

$ bin/test sympy/core

and it tests the core. It's very easy and it just works.

Ondrej

Reply all
Reply to author
Forward
0 new messages