Installing VPython on Ubuntu 12.04

1,147 views
Skip to first unread message

Peter Farrell

unread,
Nov 9, 2013, 3:50:33 PM11/9/13
to vpytho...@googlegroups.com
Hello to the group!

I'm a Linux newbie but I'm determined to get my favorite applications, like Visual Python, on my laptop running Ubuntu 12.04.

I followed the instructions on the VPython site to install Python 2.7.5 first but the Wine application isn't extracting anything from the Python .msi file. I know Ubuntu already has Python 2.7.3 so I just tried running the VPython .exe file but it says "This program can only be installed on versions of Windows designed for the following processor architectures: x64." My Toshiba satellite has a 64-bit processor.

The instructions on the VP site said to select python.exe in Wine to install VPython but in my interface I can only select wine packages.

Could anybody help? Any Linux experts out there?

Thanks in advance,

Peter Farrell

Peter Farrell

unread,
Nov 9, 2013, 3:59:41 PM11/9/13
to vpytho...@googlegroups.com
From the first line the instructions say to type into the terminal:

wine start /i python-2.7.5.amd64.msi /qn TARGETDIR=~/Python27 ALLUSERS=1

it says fixme:storage:create_storagefile Storage share mode not implemented.

I created that Python27 directory so I know it exists and it's empty.

Bruce Sherwood

unread,
Nov 9, 2013, 5:57:40 PM11/9/13
to vpytho...@googlegroups.com
The instructions given on the Linux download page at vpython.org say to download the appropriate Windows Python and VPython installers and then to execute the following:

cd ~/Downloads
wine msiexec /i Python2.7.msi /qn TARGETDIR=C:\Python27 ALLUSERS=1

You gave "start" instead of "msiexec" as the first argument for wine, and you didn't specify a directory in the fake Windows location "C:\Python27".

Try executing the statements exactly as specified.

Peter Farrell

unread,
Nov 9, 2013, 6:57:22 PM11/9/13
to vpytho...@googlegroups.com
Hi, Bruce,

Thank you so much for responding. I tried "msiexec" first, sorry about the confusion. The terminal doesn't display anything after that, just comes back with another $ prompt.
Then when I go into Wine and try to select python.exe I can't find it. I get "Program Files," "users" and "windows," none of which has Python27 in it. If I manually type "python.exe" in and type "python.dll" in as an override under Libraries (it's not in the dropdown), when I try to run python27 with the line of code
wine ~/.wine/drive_c/Python27/python
it says
wine: cannot find '/home/peter/.wine/drive_c/Python27/python'

I'm sure there's something simple I'm missing, so please keep offering suggestions. I won't be satisfied until I have VPython on this laptop. It's the greatest.

Peter



--
You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vpython-users/mHwzlXlqDoM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Wine.png

Peter Farrell

unread,
Nov 9, 2013, 7:18:28 PM11/9/13
to vpytho...@googlegroups.com
So I tried downloading the 32-bit Python .msi file for Python 2.7.5 and at least got the Python installer to show up. It attempted to install it but ended by saying an error caused it to halt and try again later. I ran the "msiexec" code from the VPython page instructions and got this message:


fixme:storage:create_storagefile Storage share mode not implemented.
fixme:sxs:cache_QueryAssemblyInfo 0x174b70, 0x00000002, L"Microsoft.VC90.CRT,version=\"9.0.21022.8\",publicKeyToken=\"1fc8b3b9a1e18e3b\",processorArchitecture=\"x86\",type=\"win32\"", 0x32f928
fixme:sxs:cache_QueryAssemblyInfo 0x174b70, 0x00000002, L"policy.9.0.Microsoft.VC90.CRT,version=\"9.0.21022.8\",publicKeyToken=\"1fc8b3b9a1e18e3b\",processorArchitecture=\"x86\",type=\"win32-policy\"", 0x32f928
err:msi:ACTION_InstallFiles compressed file wasn't installed (L"C:Python27\\Lib\\distutils\\filelist.py")
err:msi:ITERATE_Actions Execution halted, action L"InstallFiles" returned 1603

I'll keep trying!

Eric Zárate

unread,
Nov 9, 2013, 8:06:40 PM11/9/13
to vpytho...@googlegroups.com
Hi, for install properly on ubuntu please follow this steps:

1.- Download the source of vpython here: http://sourceforge.net/projects/vpythonwx/files/6.05-release/vpython-wx-src.6.05b.zip/download

2.- unpack on your favorite directory

3.- Install the dependences executing on the terminal the following command:

"sudo apt-get install automake libgtkmm-2.4-dev libglademm-2.4-dev libgtkglextmm-x11-1.2-dev  libboost-dev libboost-python-dev libboost-thread-dev libboost-signals-dev"

4 .- Install fontTools, this has to be done manually, so download from here:
http://sourceforge.net/projects/fonttools/files/latest/download

5.- unpack fonttools and execute: "sudo python setup.py install"

6.- now you have to install "ttfquery" ,for this execute : "sudo easy_install ttfquery"

7.- Poligon, manually again, so download from here: https://github.com/jraedler/Polygon2/zipball/master

8.- Similar to the previous case execute: "sudo python setup.py install"

9.- After this, go to vpython directory and execute:
./configure
make
sudo make install

10.- And you are done.

11.- open a python console and execute "import visual" to see vpython working.

Enjoy !   
--
You received this message because you are subscribed to the Google Groups "VPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vpython-user...@googlegroups.com.

Peter Farrell

unread,
Nov 10, 2013, 1:08:38 AM11/10/13
to vpytho...@googlegroups.com
Eric,

Thank you very much for your detailed instructions! I got all the way to Step 8 and got this error message:
running install
running build
running build_ext
error: pyconfig.h: No such file or directory

Python 2.7.5 still won't install all the way and VPython still can't find Python 2.7 (isn't it on Ubuntu already?).

Maybe I'm misunderstanding Step 9. What specifically do I type in to "./configure"?

Thanks for your help,

Peter


--
You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vpython-users/mHwzlXlqDoM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.

Eric Zárate

unread,
Nov 10, 2013, 1:39:47 AM11/10/13
to vpytho...@googlegroups.com
Hi, it seems that the problem is on Polygon, so download this version:

https://bitbucket.org/jraedler/polygon2/downloads/Polygon2-2.0.6.zip

as the installer use the Numpy Extension, be sure that you have it installed executing:

"sudo apt-get install python-numpy", after this unpack polygon and

inside the directory execute: "sudo python setup.py install"

the output must be like this:
Using NumPy extension!
running install
running build
running build_py
running build_ext
running install_lib
running install_egg_info
Removing /usr/local/lib/python2.7/dist-packages/Polygon2-2.0.6.egg-info
Writing /usr/local/lib/python2.7/dist-packages/Polygon2-2.0.6.egg-info

if the execution is ok, you can continue from the point 9, if don't let us know for see where the problem goes.

Eric.

Peter Farrell

unread,
Nov 10, 2013, 10:53:24 AM11/10/13
to vpytho...@googlegroups.com
Hi, Eric,

Thank you again for your continued assistance! I executed your new step and got the output you indicated. Then returned to my VPython directory and tried "./configure" but got an error message. Here's the contents of my VP directory and the error message so you can see what the problem is:
peter@peter-Satellite-C55D-A:~/vpython-wx-master$ ls
authors.txt                  MakeVPython2.7-64bit.iss
Boost_OSX_Makefile.mak       MakeVPython2.7.iss
build                        MakeVPython3.1.iss
compilevisual.py             MakeVPython3.2-64bit.iss
dist                         MakeVPython3.2.iss
distribute-0.6.34-py2.7.egg  MANIFEST.in
distribute-0.6.34.tar.gz     MSWINDOWS.txt
distribute_setup.py          README.md
distribute_setup.pyc         requirements.txt
ez_setup.py                  setup.cfg.example
get_vpy_includes.py          setup.py
get_vpy_includes.pyc         site-packages
include                      src
INSTALL.txt                  VCBuild
license.txt                  VPython.egg-info
MAC-OSX.txt                  wxPython-src-2.9.4.1.patch
MakeVPython2.6.iss           wxPython-src-2.9.4.1.patch.orig
MakeVPython2.7-32bit.iss     wxPython-src-2.9.4.1.patch.rej
peter@peter-Satellite-C55D-A:~/vpython-wx-master$ ./configure
bash: ./configure: No such file or directory

I've even been reading the INSTALL.txt file for help and I downloaded the patch it recommended. Do I need this?

Thanks again,

Peter

Bruce Sherwood

unread,
Nov 10, 2013, 11:55:13 AM11/10/13
to vpytho...@googlegroups.com
I have no idea what went wrong with the wine approach.

If you are going to build from source, it is essential to follow the instructions in the file INSTALL.txt. The simplified instructions posted by Eric don't mention wxPython, which is required (including using the patch documented in INSTALL.txt). 

There is a problem with the instructions in INSTALL.txt in that Polygon isn't handled properly, as Eric points out.

Yes, Ubuntu already has a Python 2.7.

Eric Zárate

unread,
Nov 10, 2013, 12:04:40 PM11/10/13
to vpytho...@googlegroups.com
Hi, I made a mistake on the instructions, because I gave to you the
details for install the version 5.74,
my apologies for that, and I haven't upgraded yet, but to this point
almost all the pre-requisites are ok, so I will be playing on it, and if
I have any news, I'll post it here.

Bruce Sherwood

unread,
Nov 10, 2013, 12:35:28 PM11/10/13
to vpytho...@googlegroups.com
Peter, I wonder whether the original problem you had, in your initial attempt to use the wine approach, was that you tried installing a 32-bit Python on a 64-bit Ubuntu. On (real) 64-bit Windows platforms you can run 32-bit programs, but maybe in the wine environment you need to install 64-bit (Windows) programs.

Peter Farrell

unread,
Nov 10, 2013, 2:01:10 PM11/10/13
to vpytho...@googlegroups.com
Hi, Bruce and Eric,

I found an old Linux Gazette post about VPython that just had the Ubuntu user type
apt-get install python-visual
and that did something. I opened Python and tried a VPython program and got this error message:

Traceback (most recent call last):
  File "/home/peter/vpythontest.py", line 1, in <module>
    from visual import *
  File "/usr/local/lib/python2.7/dist-packages/VPython-6.05-py2.7-linux-i686.egg/visual/__init__.py", line 34, in <module>
    from visual_common.create_display import *
  File "/usr/local/lib/python2.7/dist-packages/VPython-6.05-py2.7-linux-i686.egg/visual_common/create_display.py", line 10, in <module>
    import wx as _wx
ImportError: No module named wx

Could I just be missing a "wx" module?

Peter


On Sun, Nov 10, 2013 at 9:35 AM, Bruce Sherwood <bruce.s...@gmail.com> wrote:
Peter, I wonder whether the original problem you had, in your initial attempt to use the wine approach, was that you tried installing a 32-bit Python on a 64-bit Ubuntu. On (real) 64-bit Windows platforms you can run 32-bit programs, but maybe in the wine environment you need to install 64-bit (Windows) programs.

--
You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vpython-users/mHwzlXlqDoM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.

Peter Farrell

unread,
Nov 10, 2013, 2:03:25 PM11/10/13
to vpytho...@googlegroups.com
Hi, Bruce,

I downloaded the 64-bit version of Python 2.7.5 as well, and that didn't even start up an installer. Only the 32-bit version did. The Python 2.7 that works on my system doesn't say "64-bit" so I assume it's the 32-bit version.


On Sun, Nov 10, 2013 at 9:35 AM, Bruce Sherwood <bruce.s...@gmail.com> wrote:
Peter, I wonder whether the original problem you had, in your initial attempt to use the wine approach, was that you tried installing a 32-bit Python on a 64-bit Ubuntu. On (real) 64-bit Windows platforms you can run 32-bit programs, but maybe in the wine environment you need to install 64-bit (Windows) programs.

--
You received this message because you are subscribed to a topic in the Google Groups "VPython-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/vpython-users/mHwzlXlqDoM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.

Peter Farrell

unread,
Nov 10, 2013, 2:29:01 PM11/10/13
to vpytho...@googlegroups.com
About the "no module named wx" problem: I see there were others with that problem who posted in this Google Group. They were teachers on the school network so the advice they were given was to have their IT guy change the permissions on the lib directory. 

Since I'm working at home, I'm the IT guy and when I type

sudo python -c 'from visual import *; sphere()' 

I still get told there's "no module named wx"

Bruce Sherwood

unread,
Nov 10, 2013, 3:54:44 PM11/10/13
to vpytho...@googlegroups.com
Problems are being piled on top of problems. I believe several things went wrong. I'm guessing that the reason the wine scheme went wrong was because 32-bit Python won't run on 64-bit Linux. The attempt to build from source failed due to trying to use an installation scheme that worked for VPython 5.74 doesn't work for VPython 6.05 (in particular, you need to build wxPython). Installing python-visual added to the problems by mixing elements from an early version of VPython (python-visual) with elements from an incomplete build of VPython 6.05. The only way to recover is to wipe the slate clean and start over.

First, with regard to wine:Clearly, something went wrong with the installation, possibly due to trying to use wine to install a 32-bit version of Python. Remove wine, and if necessary delete the folder ~/.wine and all its contents. Next, follow the instructions on the Linux download page at vpython.org. In particular, make sure you install the 64-bit versions of Python 2.7 and VPython 6.05. This definitely works on my 64-bit Ubuntu 12.04.

Second, with regard to non-wine installation: Delete the contents of /usr/local/lib/python2.7/dist-packages and (if there's anything in it) delete the contents of /usr/local/lib/python2.7/site-packages. With all that stuff cleaned out, you have two alternatives, using the standard Python 2.7 that is already installed on Ubuntu:

1) Use the package manager to install python-visual. This is the simplest scheme but gives you a very old version of VPython (if I remember correctly, it is 5.11), though this may be adequate for your needs, at least initially.

2) To build VPython 6.05 from source, follow the instructions "Building from source for VPython 6" on the Linux download page at vpython.org.

Peter Farrell

unread,
Nov 10, 2013, 6:30:39 PM11/10/13
to vpytho...@googlegroups.com
Thanks, Bruce, for all your assistance. I'll uninstall Wine the way you recommended and I'll reinstall VPython, the 64-bit version. I'll probably be back with more questions.

Peter


Reply all
Reply to author
Forward
0 new messages