My Physics class requires me to use VPython for making models and such. I love the idea of incorporating code into Physics and VPython seems to be pretty good overall, but VPython really wants you to use VIDLE, their version of IDLE, as your IDE.
I am trying to use it in my favorite Python IDE, PyCharm. If I run a script that uses VPython modules that I know works in VIDLE, I get an error:
ImportError: No module named visual
I can go to PyCharm's Project Interpreter page, where it appears that I'm supposed to be able to add and remove modules, but I can't figure out how to do it. If I click Add/Install Package it brings up a searchable list of tons of available packages (from PyPi database, right?), but VPython is not on the list.
It appears that VPython is made up of 3 modules called "vis", "visual", and "visual_common" and also installs other modules "numpy" (already installed), "FontTools", "Polygon", and "ttfquery".
Any ideas? Hopefully it's just something simple.
Unfortunately, you cannot install vpython as easy as normal python packages. The process is a lot more involved than that. If you want to develop using PyCharm though, you still can.
First and foremost, you need to install vpython on windows. This will likely install itself as one of your main python installation's site packages.
Install it from here -> http://vpython.org/contents/download_windows.html
After doing so, simply chose the python installation that has vpython installed.
If you wish to create a virtualenv, then do so with the --system-site-packages
:
$ virtualenv --help [12:51:06]
Usage: virtualenv [OPTIONS] DEST_DIR
Options:
--version show program's version number and exit
(...)
--no-site-packages DEPRECATED. Retained only for backward compatibility.
Not having access to global site-packages is now the
default behavior.
--system-site-packages
Give the virtual environment access to the global
site-packages.
(...)