Skip to content

Notes on Windows installation

Colin B. Macdonald edited this page Jul 25, 2023 · 46 revisions

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.

Installing from packages

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:

Option 1: Self-contained "bundle" package [DEPRECATED]

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.

  1. download the symbolic-win-py-bundle-x.y.z.zip file at our github releases page.
  2. start Octave, change folder to where your downloads are.
  3. type pkg install symbolic-win-py-bundle-x.y.z.zip
  4. type pkg load symbolic
  5. type syms x

Option 2: Installing Python and SymPy with Anaconda

Anaconda is a popular way to install Python and friends on Windows. It comes with SymPy reinstalled.

  1. Install Anaconda.

  2. 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:

  1. setenv PYTHON /anaconda3/bin/python (users have also/instead reported /anaconda3/python.exe)

To test your setup, type:

  1. pkg load symbolic
  2. Try syms x and factor(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.

Option 3: manual installation of Python and SymPy

  1. 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.
  2. 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
  3. Start Octave from the Octave(GUI) or Octave(CLI) launchers - or from the octave.bat.

  4. Run the Octave command: pkg install -forge symbolic. This automatically downloads the latest version. Some people have reported some (harmless?) warnings about directory creation.

  5. Load the symbolic package with the Octave command: pkg load symbolic

  6. Try the command syms x and then factor(x^2-x-6)


Issues and workarounds

Please add them here. I've added a couple things I don't understand very well. You can/should also file issues.

I want nice unicode output

You can! Try sympref display unicode. You may need to download a different font: https://github.com/gnu-octave/symbolic/issues/912#issuecomment-426572475

I get an error about python_ipc_popen2 undefined

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.

"ut8_heavy.pl" Perl warnings

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

Windows XP

As of 2.3.0, no particular action should be necessary.

Paths

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"?

SymPy

Does it matter where SymPy is installed? My experimenting with the self-contained package suggests it does.

32 vs 64 bit windows?

Does the self-contained package work on both? MXE Octave seems to support both.