Uninstalling a failed vpython installation.

1,061 views
Skip to first unread message

Doc Duke

unread,
Jul 11, 2017, 10:22:40 PM7/11/17
to VPython-users
  • I followed the instructions in the web page: VPython - 3D Programming for Ordinary Mortals

    • In: "Experienced Python / VPython user? Need access to all Python modules? Try VPython 7:"

      • It says: "In a Power Shell or Command Prompt (Windows) or Terminal (Mac / Linux) run this command, which will install VPython 7 for Python 2.7, 3.4, 3.5, or 3.6: pip install vpython".

    • I did this. I then ran "from visual import *" and got:

      • ImportError: No module named 'visual'

    • Guessing, I tried: "from vpython import *" and got:

      • Exception: The non-notebook version of vpython requires Python 3.5 or later. vpython does work on Python 2.7 and 3.4 in the Jupyter notebook environment.

    • So first, your documentation says "visual" and should say "vpython" and second, it says Py 3.4 should run it. Vpython clearly does not run in Py 3.4.

    • Your instructions proceed: "To use a Jupyter notebook (Python 2.7, 3.4, 3.5, 3.6): There are two ways to start a Jupyter notebook. In a terminal, execute "jupyter notebook"...

      • Executing that opens an Idle window with the text of jupyter.py in it.

        • Pressing F5 gets:

    usage: jupyter.py [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]
                      [--paths] [--json]
                      [subcommand]
    jupyter.py: error: one of the arguments --version subcommand --config-dir --data-dir 
    --runtime-dir --paths is required
  • So those instructions also do not work.

  • Having looked at the jupyter installation manual, I do not wish to install 400 MB of "Continuum Anaconda" (free version!) that I have no interest in, just to get access to Vpython.

    • This installation of Python is in a production environment. I do not wish to change Python versions. I biggest mistake was installing vpython here before testing it in a VM.


  • My question is: How do I remove all of the programs that were installed with Vpython, since it is unusable on this computer.

    • I really mean ALL. My \Python34\Lib\site-packages folder now contains 86 folders of which 81 have today's date and came with vpython. There are also 11 files in the site-packages folder with today's date.

      • Will pip uninstall vpython get rid of all these "extras" I didn't know I was getting?

    • Note that the following was reported in the install record:

  Found existing installation: setuptools 2.1
    Uninstalling setuptools-2.1:
      Successfully uninstalled setuptools-2.1 
  • Will "pip uninstall" restore the original version of setuptools, or leave something in its place that won't compromise my Python 3.4 installation?


  • Thanks in advance for your help.


Bruce Sherwood

unread,
Jul 11, 2017, 11:07:46 PM7/11/17
to VPython-users
I'm sorry you had all these problems. 

Where did you find instructions to use "from visual import *"? The instructions on the first page of vpython.org for a test program specifically say "from vpython import *".

I gather that you did not install Anaconda or the Jupyter machinery, so as the instructions state, vpython won't work with Python 3.4. I don't understand why "jupyter notebook" would invoke IDLE (on some file with the name jupyter.py), but that's certainly not under our control. I don't understand why you say that the instructions indicate that vpython will work with Python 3.4, given that the Jupyter notebook machinery apparently is not available.

Since neither you nor I have any idea what that huge number of site-packages folders are about, I have no way of knowing what pip uninstall will do. Perhaps if you named some of these folders it would be possible to get some idea of the issues. I'm guessing that the VPython installer in trying to deal with dependencies did something odd due to assuming that it was working in an Anaconda environment, or at least one with IPython and Jupyter already installed as required.

Doc Duke

unread,
Jul 11, 2017, 11:39:41 PM7/11/17
to VPython-users


On Tuesday, July 11, 2017 at 8:07:46 PM UTC-7, Bruce Sherwood wrote:
I'm sorry you had all these problems.  ...
 
My apology if this reply comes in a strange place.  The forum appears to give me only the choices of replying to my original post or replying to yours, with your text included (which I just deleted).  I hope that leaves your original reply intact.

The invocation came from:
https://stackoverflow.com/questions/39369766/simplest-way-to-plot-3d-sphere-by-python
which brought me to vpython.com.  This website offered "pip install vpython" as the easy way to install it in my existing python installation.  Perhaps too easy.  Here is what that one line brought in (neglecting the first 9 lines,  which were already there before the "pip install vpython"):

 Directory of E:\Python34\Lib\site-packages

08/03/2013  17:17               121 README.txt
05/24/2016  20:27    <DIR>          PIL
05/24/2016  20:27    <DIR>          Pillow-3.2.0.dist-info
08/17/2016  23:13    <DIR>          pip
08/17/2016  23:13    <DIR>          pip-8.1.2.dist-info
08/17/2016  23:24           105,472 pyodbc.pyd
08/17/2016  23:24    <DIR>          pyodbc-3.0.10.dist-info
11/09/2016  12:37             8,261 pandocfilters.py
03/26/2017  18:10            77,455 typing.py
07/07/2017  18:48               177 jupyter.py
07/07/2017  18:48               451 ipykernel_launcher.py
07/07/2017  18:49             6,997 entrypoints.py
07/07/2017  18:49            35,431 mistune.py
07/07/2017  18:49            30,098 six.py
07/07/2017  18:49            15,649 decorator.py
07/07/2017  18:49             2,740 simplegeneric.py
07/07/2017  18:49               126 easy_install.py
07/07/2017  18:49             9,849 pickleshare.py
07/07/2017  18:49               147 run.py
07/07/2017  18:49             5,526 backports_abc.py
07/07/2017  18:49    <DIR>          six-1.10.0.dist-info
07/07/2017  18:49    <DIR>          ipython_genutils
07/07/2017  18:49    <DIR>          ipython_genutils-0.2.0.dist-info
07/07/2017  18:49    <DIR>          decorator-4.0.11.dist-info
07/07/2017  18:49    <DIR>          traitlets
07/07/2017  18:49    <DIR>          traitlets-4.3.2.dist-info
07/07/2017  18:49    <DIR>          zmq
07/07/2017  18:49    <DIR>          pyzmq-16.0.2.dist-info
07/07/2017  18:49    <DIR>          jupyter_core
07/07/2017  18:49    <DIR>          jupyter_core-4.3.0.dist-info
07/07/2017  18:49    <DIR>          dateutil
07/07/2017  18:49    <DIR>          python_dateutil-2.6.0.dist-info
07/07/2017  18:49    <DIR>          jupyter_client
07/07/2017  18:49    <DIR>          jupyter_client-5.1.0.dist-info
07/07/2017  18:49    <DIR>          simplegeneric-0.8.1-py3.4.egg-info
07/07/2017  18:49    <DIR>          jedi
07/07/2017  18:49    <DIR>          jedi-0.10.2.dist-info
07/07/2017  18:49    <DIR>          wcwidth
07/07/2017  18:49    <DIR>          wcwidth-0.1.7.dist-info
07/07/2017  18:49    <DIR>          prompt_toolkit
07/07/2017  18:49    <DIR>          prompt_toolkit-1.0.14.dist-info
07/07/2017  18:50    <DIR>          pygments
07/07/2017  18:50    <DIR>          Pygments-2.2.0.dist-info
07/07/2017  18:50    <DIR>          pkg_resources
07/07/2017  18:50    <DIR>          setuptools
07/07/2017  18:50    <DIR>          setuptools-36.0.1.dist-info
07/07/2017  18:50    <DIR>          pickleshare-0.7.4.dist-info
07/07/2017  18:50    <DIR>          typing-3.6.1-py3.4.egg-info
07/07/2017  18:50    <DIR>          colorama
07/07/2017  18:50    <DIR>          colorama-0.3.9.dist-info
07/07/2017  18:50    <DIR>          win_unicode_console
07/07/2017  18:50    <DIR>          win_unicode_console-0.5-py3.4.egg-info
07/07/2017  18:50    <DIR>          IPython
07/07/2017  18:50    <DIR>          ipython-6.1.0.dist-info
07/07/2017  18:50    <DIR>          backports_abc-0.5.dist-info
07/07/2017  18:50    <DIR>          tornado
07/07/2017  18:50    <DIR>          tornado-4.5.1-py3.4.egg-info
07/07/2017  18:50    <DIR>          ipykernel
07/07/2017  18:50    <DIR>          ipykernel-4.6.1.dist-info
07/07/2017  18:50    <DIR>          qtconsole
07/07/2017  18:50    <DIR>          qtconsole-4.3.0.dist-info
07/07/2017  18:50    <DIR>          jupyter_console
07/07/2017  18:50    <DIR>          jupyter_console-5.1.0.dist-info
07/07/2017  18:50    <DIR>          jsonschema
07/07/2017  18:50    <DIR>          jsonschema-2.6.0.dist-info
07/07/2017  18:50    <DIR>          nbformat
07/07/2017  18:50    <DIR>          nbformat-4.3.0.dist-info
07/07/2017  18:50    <DIR>          markupsafe
07/07/2017  18:50    <DIR>          MarkupSafe-1.0-py3.4.egg-info
07/07/2017  18:50    <DIR>          jinja2
07/07/2017  18:50    <DIR>          Jinja2-2.9.6.dist-info
07/07/2017  18:50    <DIR>          entrypoints-0.2.3.dist-info
07/07/2017  18:50    <DIR>          pandocfilters-1.4.1-py3.4.egg-info
07/07/2017  18:50    <DIR>          mistune
07/07/2017  18:50    <DIR>          __pycache__
07/07/2017  18:50    <DIR>          mistune-0.7.4.dist-info
07/07/2017  18:50    <DIR>          testpath
07/07/2017  18:50    <DIR>          testpath-0.3.1.dist-info
07/07/2017  18:50    <DIR>          webencodings
07/07/2017  18:50    <DIR>          webencodings-0.5.1.dist-info
07/07/2017  18:50    <DIR>          html5lib
07/07/2017  18:50    <DIR>          html5lib-0.999999999.dist-info
07/07/2017  18:50    <DIR>          bleach
07/07/2017  18:50    <DIR>          bleach-2.0.0.dist-info
07/07/2017  18:50    <DIR>          nbconvert
07/07/2017  18:50    <DIR>          nbconvert-5.2.1.dist-info
07/07/2017  18:51    <DIR>          notebook
07/07/2017  18:51    <DIR>          notebook-5.0.0.dist-info
07/07/2017  18:51    <DIR>          widgetsnbextension
07/07/2017  18:51    <DIR>          widgetsnbextension-2.0.0.dist-info
07/07/2017  18:51    <DIR>          ipywidgets
07/07/2017  18:51    <DIR>          ipywidgets-6.0.0.dist-info
07/07/2017  18:51    <DIR>          jupyter-1.0.0.dist-info
07/07/2017  18:51    <DIR>          numpy
07/07/2017  18:51    <DIR>          numpy-1.13.1.dist-info
07/07/2017  18:51    <DIR>          vpnotebook
07/07/2017  18:51    <DIR>          vpnotebook-0.1.3-py3.4.egg-info
07/07/2017  18:51    <DIR>          vpython
07/07/2017  18:51    <DIR>          ..
07/07/2017  18:51    <DIR>          .
07/07/2017  18:51    <DIR>          vpython-7.0.3.dist-info
              15 File(s)        298,500 bytes
I have sorted the directory listing so that the 7/7/2017 files come last.  I now note that the vpython install also overwrote the copy of numpy that was already present in site-packages folder.

[I am now thoroughly mystified.  I see one "post reply" red button, plus four green "post" buttons, and two open edit windows, one with my original post, and the one here.  I'll click this green "post" button and pray that it works.

Doc Duke

unread,
Jul 11, 2017, 11:56:10 PM7/11/17
to VPython-users


On Tuesday, July 11, 2017 at 7:22:40 PM UTC-7, Doc Duke wrote:
  • I followed the instructions in the web page: VPython - 3D Programming for Ordinary Mortals

    • In: "Experienced Python / VPython user? Need access to all Python modules? Try VPython 7:"

      • It says: "In a Power Shell or Command Prompt (Windows) or Terminal (Mac / Linux) run this command, which will install VPython 7 for Python 2.7, 3.4, 3.5, or 3.6: pip install vpython".

    • I did this. I then ran "from visual import *" and got:

      • ImportError: No module named 'visual'

    • Guessing, I tried: "from vpython import *" and got:

      • Exception: The non-notebook version of vpython requires Python 3.5 or later. vpython does work on Python 2.7 and 3.4 in the Jupyter notebook environment.

    • So first, your documentation says "visual" and should say "vpython" and second, it says Py 3.4 should run it. Vpython clearly does not run in Py 3.4.

    • Your instructions proceed: "To use a Jupyter notebook (Python 2.7, 3.4, 3.5, 3.6): There are two ways to start a Jupyter notebook. In a terminal, execute "jupyter notebook"...

      • Executing that opens an Idle window with the text of jupyter.py in it.

        • Pressing F5 gets:

    usage: jupyter.py [-h] [--version] [--config-dir] [--data-dir] [--runtime-dir]
                      [--paths] [--json]
                      [subcommand]
    jupyter.py: error: one of the arguments --version subcommand --config-dir --data-dir 
    --runtime-dir --paths is required
  • So those instructions also do not work.

  • Having looked at the jupyter installation manual, I do not wish to install 400 MB of "Continuum Anaconda" (free version!) that I have no interest in, just to get access to Vpython.

    • This installation of Python is in a production environment. I do not wish to change Python versions. My biggest mistake was installing vpython here before testing it in a VM.

Matt Craig

unread,
Jul 12, 2017, 12:10:11 PM7/12/17
to VPython-users
Hi,

A few things....none of which really offer an easy fix, unfortunately.

  • If you have a backup from before you installed vpython, I would restore from that, or at least generate a list of of what packages and versions were installed in your site-packages before vpython.
  • pip uninstall vpython will not remove all of its dependencies, in part because it has no way of knowing which packages (e.g. numpy) are used for programs other than vpython....
  • ...that said, we can feed pip a list of programs to uninstall: https://pip.pypa.io/en/stable/reference/pip_uninstall/
  • I can generate a list of all of the packages that get pulled in when vpython is installed. It is pretty long because of the dependencies on jupyter, numpy, etc. Please let me know if you want that.
  • In the future I'd recommend trying it out with miniconda rather than anaconda. miniconda uses the same packages as anaconda; the difference is that anaconda includes a bajillion packages while miniconda includes the bare minimum needed to install new things. The advantage of miniconda or anaconda is that it will install in your user directory without affecting a system python install.
For what it's worth, I feel your pain...I've had times when pip has installed a ton of stuff.

Matt Craig 

Doc Duke

unread,
Jul 13, 2017, 7:58:20 PM7/13/17
to VPython-users
Thanks, Bruce and Matt, for your comments.  You have convinced me that there is not a simple way to "undo" the pip install.  Fortunately, I think I have an alternative.  While your backup methods may differ from mine, you may have an equivalent solution.

I use http://www.terabyteunlimited.com/index.htm drive image software.  It includes TBIView, which lets me access the backup image and copy files and folders out of it.  In my experience, Python is just about unique in the Windows world, since it stores everything in the Python34 (in this case) folder, and doesn't use the Windows directory or the Registry, except when installing Python itself.  I expect pip to follow that convention. 

I have a backup of my Windows partition from about a month ago.  I have copied the Python34 folder from there.  I'll try to rename Python34 to Python34V and copy the restored files to Python34.

Nope.  Doesn't work.  It might have worked from a Live CD or another active partition, but Windows chose to "help" me by renaming SOME of the links to the executable files in Python34V.  The result was that the Python34 installation was corrupted.  A visit to RegEdit taught me that Windows has a very large number of references to Python34 in the registry!

Uninstalling Python34 and reinstalling it worked.  I'm now going through my py3 work files to see what add-ons I need to reinstall.

Thanks again for the help.  I will next try Vpython in Py36 in a virtual machine, probably in Linux.


Wayne

unread,
Jul 14, 2017, 1:42:46 PM7/14/17
to VPython-users
Another option if you are just trying things out in the latest stable release of VPython is just to run in in the Binder system that uses ephemeral Jupyter notebooks. 
The current link from Bruce's repo isn't working.
However, I made a slightly customized version on the current beta site of the new Binder system, and it is working as of this moment. 
Go to https://github.com/fomightez/vpython-jupyter and click the `Launch` button at the bottom. Just click on `index.pynb` after it loads to see the demos or start your own notebook with the `New` button in the upper corner. Paste your code in a new cell and type `shift-Enter` to run.

Matt Craig

unread,
Jul 14, 2017, 3:57:46 PM7/14/17
to vpytho...@googlegroups.com
Hi Wayne, 

Were there any changes you had to make to get the binder beta to work?

A PR to fix the binder button on the main repo would be well received :)

Matt Craig


--
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/S7s81g4TVRw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to vpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Matt Craig

unread,
Jul 14, 2017, 4:40:54 PM7/14/17
to VPython-users
I'm glad you found a solution, and thanks for posting it here in case someone else encounters a situation like this.

Matt

Wayne

unread,
Jul 17, 2017, 3:13:39 PM7/17/17
to VPython-users
Hi Matt,
Sorry, I missed your question about if any changes were needed until just now. 
The answer is nothing was needed beyond changing the badge link to point at the beta site, e.g., http://beta.mybinder.org/repo/fomightez/vpython-jupyter . It will actually build the deployable version the first time you call it after a change now.
In theory I'd be glad to issue a PR to fix it, but my fork of the VPython repo has the addition of Seaborn and I have some other resources for colleagues linking to it and so I cannot just remove it right now and start fresh. I could make a new branch to remove it and restore the one file I changed otherwise, but it may just be easier for someone else to do it. I am posting an issue about it at Bruce's repo.

-Wayne
To unsubscribe from this group and all its topics, send an email to vpython-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages