briot / geneapro

Genealogical software based on the GenTech data model
http://briot.github.com/geneapro/
GNU General Public License v2.0
33 stars 8 forks source link

Running under Windows #68

Open Olghn opened 4 years ago

Olghn commented 4 years ago

I followed a link here from geneaquilts and was curious to install geneapro to see what it looked like. Although I have used computers since punched card days and know Windows and macos pretty well and have used Solaris, VAX/VMS, and other systems at work (including for software testing), I never have really had to master installing packages or python etc. So in summary in experience terms I am a bit of a mixed bag and I am very low priority user as I am not likely to have time or ability to contribute to the project... but I don't like to be defeated.

I installed Python 3.8 with some difficulty. Installing for all users it is in C:\Program Files (x86)\Python38-32\ and I am launching it with the py Python Launcher so I didn't lose v2.7 and the system and user env var have no Python paths.

I installed pip and Django 3.0.7, again with some difficulty (took some time before I realized I needed to run pip from the CMD window and not from within Python!)

I got the geneapro download and (rightly or wrongly) placed it in C:\Program Files (x86)\Python38-32\Scripts\geneapro-master\ (Need Admin privilege to write anything there and that could be a problem?)

Now I find instructions in README.md telling me to run settings.sh... which seems to be unix only, So I am wondering what I would do if I wanted to install on Windows.

I started stepping through it and used pip to install npm and appdirs but then quit that as it seemed to be leading me to install an older version of Django which I already have.

The Wiki seems to have alternative install instructions and just tells me to "Run geneaprove.py, which creates an empty database and starts the server. You can import your existing GEDCOM data directly by connecting to that server with a web browser."

When I try running it it fails with

C:\Program Files (x86)\Python38-32\Scripts\geneapro-master>py geneaprove.py File "geneaprove.py", line 16 print(f"Creating a new database {db}") ____^ SyntaxError: invalid syntax

I guessed the "f" might be an error in the code so edited it out.

Next attempt gets me:

C:\Program Files (x86)\Python38-32\Scripts\geneapro-master>py geneaprove.py Traceback (most recent call last): File "geneaprove.py", line 8, in from django.core.management import execute_from_command_line ImportError: No module named django.core.management

At which point it is probably pretty obvious I don't know what I am doing.

Any suggestions welcome.

(I am running Windows 7 Pro)

briot commented 4 years ago

Hello, my own experience with developing on Windows is pretty limited... Generally speaking, I think you are on the right track when you run the pip commands manually. Perhaps you can have a batch file, or whatever is commonly used on Windows these days.

Just some warnings first: Geneapro is not at all a finished software. It often works fine for displaying my own genealogy data, but even that is sometimes broken... Importing data from other software is an ongoing work, which I fix when I get reproducer and I have time to work on geneapro...

If you have used Solaris before, linux would not be so different. So perhaps you could quickly install a VirtualBox machine with Ubuntu on it, then run geneapro from there just to check whether it really has any interest for you, before you invest time trying to get it to work on Windows, just to possibly be disappointed....

That said:

The first python error you reported ("invalid syntax" on a f-string) is likely that you did not, in fact, run python 3.8, but some older version. f-string are template strings, so the f is not a typo and should be left.

For the second error, I'll need to take another look... I think someone else was using Windows, in past issues.

Olghn commented 4 years ago

Thanks very much for the quick feedback! The docs (and lack of activity) made clear enough to me that the software isn't finished - but it still piqued my interest.

I have been meaning to learn Python for some time - I think I overcame the PIP problem. I am not very surprised that the "f" in the print command wasn't an error.... it sounds like I continue to have a problem with the environment. One I perhaps wouldn't have had if I had only one version of Python installed and had let the system and user environment variables be set.

I also have Ubuntu on a memory stick somewhere - though I rather like to avoid the hassle of a reboot or switching to retired machine to run it. (I also have vbox and an old version of VMware installed but also find them a bit of a nuisance because I use them so infrequently)

Anyway - I need to put this aside for the moment - hopefully I can actually find time to get beyond the basics in Python first.