wiki:G2onPy3

Version 4 (modified by toby, 4 years ago) (diff)

--

GSAS-II with Python 3.x

Here are some instructions for installing Python 3.6 for GSAS-II. At this time, Anaconda does not supply a conda package for wxPython, so a single-download installer is not being created.

Windows

Install Miniconda from https://repo.continuum.io/miniconda
  • Download and run the Miniconda3-latest-Windows-x86_64.exe file. The installer will ask you to exit all applications. This is probably not needed, but saving your work in all apps before continuing seems like a good idea.
  • You will need to accept the license agreement.
  • Select "Just Me" unless you want to run Python from multiple accounts on your computer and are logged into an admin account. Use of "Just Me" is recommended.
  • Select the installation location with some care. Avoid any path that contains a space in it (avoid C:\Users\Brian Toby\Miniconda3). I suggest C:\conda3 unless D: (etc.) would be a better choice. Make a note of the path you use and change subsequent commands to use this path if you use something else.
  • Unselect both of the two "Advanced option" boxes, unless you are planning to do your own development in Python and understand what they do.
  • Click on "Install" and wait a few minutes while the minimal Python files are unpacked and are installed on your computer.
  • On the Thanks page, you may want to unselect the two boxes, but do note that the Anaconda folks are doing a great service for science.
Start a Command window

In the start menu, look for an Anaconda3 Windows menu item and No image "menucommand.png" attached to G2onPy3 select the "Anaconda Prompt" item.

  • This will start a cmd.exe window where Python and other Anaconda-installed tools are in the path.
  • If for some reason this command is not available. Do this: Open a "Command Prompt" window and type c:\conda3\Scripts\activate into that window to set up the Anaconda environment.
Update the Python installation

Type this command:

conda update --all

  • you will be given a list of packages that have been updated since the miniconda file was created, press enter at the Proceed prompt to perform the update. This may take a few minutes.
Add other needed packages

Type this command:

conda install matplotlib pillow pyopengl scipy svn h5py pywin32 m2w64-gcc-libgfortran

  • You will be given a list of packages to be downloaded and installed, press enter at the Proceed prompt to perform the install. This will take at least a few minutes.
Install the wxPython package

Type this command:

pip install wxpython

  • a 23 Mb file is downloaded and installed. This usually takes less than a minute.
Install GSAS-II
  • Create an empty directory for GSAS-II. This can be done from the file explorer, or with commands such as

mkdir c:\GSASII

cd /d c:/GSASII

  • Download a script to install GSAS-II from this location:

https://subversion.xray.aps.anl.gov/trac/pyGSAS/browser/install/bootstrap.py?format=txt

and save it into that location

  • Start the GSAS-II installation process with this command:

python c:\GSASII\bootstrap.py

  • answer questions as needed.
  • The bootstrap process should load all files needed by GSAS-II and should create RunGSASII.bat (and link it on Desktop) that will start GSASII