PDFGUI windows installer

380 views
Skip to first unread message

davewr...@hotmail.com

unread,
May 22, 2015, 11:23:50 AM5/22/15
to diffpy...@googlegroups.com
Hi,

I had a working version of PDFGUI on my Windows 7 PC which stopped working after I installed PDFGETX3 and the required Python 2.7 packages. I thought an easy solution would be to reinstall DiffPy with the .exe windows installer. I uninstalled DiffPy and reinstalled with the windows installer (on the D: drive) which seemed to run with no problems. Unfortunately it seems not to have created the PDFGUI and PDFFIT python scripts in the D:\diffpy\python25\scripts folder.

Does anyone have any idea why this might have happened?

Thanks,

David

Luke Granlund

unread,
Jun 9, 2015, 10:11:47 AM6/9/15
to diffpy...@googlegroups.com
Hi David,

This doesn't directly address your issue with the official Windows installer, but for my own use I've been building PDFgui and its dependencies on Windows 7 so I can use it as part of a more modern Python installation.  Both PyCifRW and PDFfit2 have C dependencies that need to be compiled, but the process isn't too difficult.  Hopefully this will help you, or anyone else who would like to use PDFgui on Windows.

1. Install a standard Python 2.7 distribution from python.org.

2. Install appropriate binaries for numpy, matplotlib, and wxPython.

3. Download and install Visual Studio Express 2008.  (This should also work, if you don't want the IDE.)

4. Download binaries for the VSE2008-compatible port of GNU Scientific Library (GSL) 1.13, and extract to some folder.

5. Download the following header files (for PyCifRW) and stick them in the GSL "include" directory since we'll need to point the compiler to that anyway.  (You can put them somewhere else, just make sure to add that directory as well in step 7.)

6. Download the sources for pdfgui and its dependencies, and extract them to some folder.  (Due to recent changes in how pip/easy_install resolve package versions, and API changes in some of the most recent releases of the dependencies, those programs don't necessarily download the correct packages for older software like PDFgui.)  The files listed here correspond to the most recent official release of PDFgui.
PyCifRW
diffpy.Structure
diffpy.utils
diffpy.pdffit2
diffpy.pdfgui

7. In a command window set environment variables pointing to the GSL include and lib directories (step 4), respectively.  (Depending on your system, this might need to be an administrator command window.)
SET CL=/I"C:\path\to\gsl\include"
SET LINK=/LIBPATH:"C:\path\to\gsl\lib"

8. From this same command window, run "setup.py install" in the main directory of each of the packages listed in step 6.  I'd recommend running them in the order listed above, which installs relevant dependencies first.

9. Run PDFgui!  Besides an ignorable exception that sometimes occurs when loading CIFs, I have not had any problems.

Hope this is helpful!
Luke

Pavol Juhas

unread,
Jun 9, 2015, 11:12:11 AM6/9/15
to diffpy...@googlegroups.com
Hi Luke,

Thank you so much for posting the instructions for building PDFGui
from sources on Windows. Have you managed to install it under
Anaconda for Windows? An updated Windows release of PDFgui is
way due and I would like to provide it as a package for Anaconda.
That way all the dependencies (NumPy, Matplotlib, etc.) could be
seamlessly installed from the standard Anaconda repository and the
installation procedure would be the same for Windows, Linux and Mac.

I have already put together some recipes for packaging diffpy
libraries as Anaconda packages, these are in the diffpy branch at
my clone of the official conda-recipes repository:
https://github.com/pavoljuhas/conda-recipes/tree/diffpy
So far this has recipes for PyCifRW, diffpy.utils and
diffpy.Structure. Unfortunately, I don't have much time to work
on this. It would be of tremendous help if you (or anyone else)
could pick up on what has been done and add in the recipes for
the remaining packages diffpy.pdffit2 and diffpy.pdfgui.

Best,

Pavol

--
Dr. Pavol Juhas
Condensed Matter Physics and Materials Science Department
Brookhaven National Laboratory
P.O. Box 5000
Upton, NY 11973-5000

Pavol Juhas

unread,
Jun 9, 2015, 11:14:48 AM6/9/15
to diffpy...@googlegroups.com
On Fri, May 22, 2015 at 03:06:30AM -0700, davewr...@hotmail.com wrote:
...
Hi David,

The current Windows installation of PDFgui comes with its own
(old) Python 2.5, while PDFgetX3 should be installed to a
separate Python (2.6 or 2.7) distribution such as Anaconda
or Canopy.

Perhaps those 2 installations got somehow mixed during the
installation procedure.

Can you try to run

d:\diffpy\python25\pythonw.exe -m diffpy.pdfgui.applications.pdfgui

from a command window? If PDFgui packages are in place, this
should start the program in the same way as with the script;
you can define a desktop shortcut for this command.

If it does not work, I'd recommend to remove the d:\diffpy
installation and then temporarily disable the other Python
used for PDFgetX3 - for example (if you use Anaconda) by
renaming the Anaconda folder to Anaconda.disabled. Run the PDFgui
installer again and hopefully this time it will complete and generate
the missing scripts. Finally, restore the Anaconda installation
by renaming the Anaconda.disabled folder back to Anaconda.

I hope this helps,

Luke Granlund

unread,
Jun 9, 2015, 1:33:24 PM6/9/15
to diffpy...@googlegroups.com, pju...@bnl.gov

 
Hi Pavol,

I haven't used Anaconda at all, I'm afraid.  I doubt I can spare the time to delve into that during for the next few months, but afterwards it should be possible.  I'll keep it in mind.  The recipes you link to look like a good starting place, so thank you.
Reply all
Reply to author
Forward
0 new messages