-
Notifications
You must be signed in to change notification settings - Fork 37
Notes on Windows installation
Note: the main Octave Symbolic package developer (Colin) has no direct Windows access so this is likely to be a bit rough! Help much appreciated: please be bold, edit and improve this documentation.
First get Octave! The latest version can be downloaded from https://www.octave.org. Install with default options.
Octave should be started from the "Octave (GUI)" or "Octave (CLI)" launchers - or from the octave.bat file in the Octave binaries directory. This will ensure that the system path is correctly set.
As of Octave version 6, the symbolic package is bundled with the official installer of Octave for Windows. It should be enough to load it with pkg load symbolic
to be able to use it.
For older versions of Octave, chose one of these installation methods:
No longer supported but maybe still useful on older systems with older Octave (maybe before version 6)
No dependencies, includes a Python interpreter and SymPy.
- download the
symbolic-win-py-bundle-x.y.z.zip
file at our github releases page. - start Octave, change folder to where your downloads are.
- type
pkg install symbolic-win-py-bundle-x.y.z.zip
- type
pkg load symbolic
- type
syms x
Anaconda is a popular way to install Python and friends on Windows. It comes with SymPy reinstalled.
-
Install Anaconda.
-
Install Symbolic from within Octave by typing
pkg install -forge symbolic
. This automatically downloads the latest version.
We need to make Symbolic use the Python interpreter from Anaconda. Type the following in Octave:
-
setenv PYTHON /anaconda3/bin/python
(users have also/instead reported/anaconda3/python.exe
)
To test your setup, type:
pkg load symbolic
- Try
syms x
andfactor(x^2-x-6)
Debugging: try sympref reset
and sympref diagnose
.
Updating SymPy: if you installed Anaconda a long time ago, you can update to the latest SymPy following instructions found here.
-
Download the Python .msi installer from https://www.python.org/downloads/.
- Install with the following option 'Add python.exe to path' set to 'Will be installed on local hard drive' in the Customize Python dialog.
When installing on Windows 10, I had to leave the box "[ ] install for all users" *unchecked. I filed Issue #371 about this.
-
Install the SymPy package using the Python package manager, pip.
- If python is installed properly, it can be run from the command line. Open a Windows Command Prompt or PowerShell (in Windows 10, right click the Start button, and select Command prompt or PowerShell)
- At the prompt type
pip install sympy
. This should download and install the sympy package and its dependency mpmath. - If you do not have Administrator privileges, you may receive an error message and need to locally install the packages instead. The command for local package installation is:
pip install --user sympy
-
Start Octave from the Octave(GUI) or Octave(CLI) launchers - or from the octave.bat.
-
Run the Octave command:
pkg install -forge symbolic
. This automatically downloads the latest version. Some people have reported some (harmless?) warnings about directory creation. -
Load the symbolic package with the Octave command:
pkg load symbolic
-
Try the command
syms x
and thenfactor(x^2-x-6)
Please add them here. I've added a couple things I don't understand very well. You can/should also file issues.
You can! Try sympref display unicode
. You may need to download a different font: https://github.com/gnu-octave/symbolic/issues/912#issuecomment-426572475
Try restarting Octave. This error occurs when something changes the files in the Symbolic package while its running. I guess it could be triggered by a virus scanner or some indexing software, see https://github.com/gnu-octave/symbolic/issues/424 . It is also triggered by reinstalling or upgrading Symbolic while symbolic objects are in use.
This has been fixed in Octave 5.1. Previously, many people are saw lots of warnings during install:
Use of uninitialized value in lc at /usr/lib/perl5/5.8/utf8_heavy.pl
As of 2.3.0, no particular action should be necessary.
How paths are supposed to work on modern Windows? Do Python installers take care of this for you? If you open a "cmd.exe" command line, does "python" work? If so, how about "import sympy"?
Does it matter where SymPy is installed? My experimenting with the self-contained package suggests it does.
Does the self-contained package work on both? MXE Octave seems to support both.