PySolFC
PySolFC copied to clipboard
Install doesn't work on Ubuntu focal
This is what i tried so far:
$ git clone https://github.com/shlomif/PySolFC.git
$ apt install python3-tk python3-pip
$ ./pysol.py
Please install pysol_cards.py from "PyPI"
$ python -m pip install --user --upgrade pysol_cards
$ ./pysol.py
ModuleNotFoundError: No module named 'configobj'
$ python -m pip install --user --upgrade configobj
$ ./pysol.py
OSError: ./pysol.py: DataLoader could not find ('html/license.html',)
$ mv html-src html
$ ./pysol.py
OSError: DataLoader could not find image joker07_40_774 in images/logos
$ mv data/images .
$ ./pysol.py
ModuleNotFoundError: No module named 'attr'
$ python3 -m pip install --user --upgrade attr
Successfully installed attr-0.3.1
$ ./pysol.py
AssertionError: Newer version of https://pypi.org/project/attrs/ is required.
$ python3 scripts/linux-install.py
FileNotFoundError: [Errno 2] No such file or directory: 'gmake'
Try installing the module attrs (the plural). It's different from attr - I've made that mistake many times when setting up a new environment.
Yes that was it, now it runs! ;-) This is what i did:
# this works for:
$ lsb_release -d
Description: Ubuntu 20.04.3 LTS
$ python --version
Python 3.8.10
# dependencies
$ apt install python3-tk python3-pip git python-is-python3
# install these to ~/.local/lib/python3.8/
$ pip3 install --user --upgrade configobj
$ pip3 install --user --upgrade attrs
$ pip3 install --user --upgrade pysol_cards
# download
$ git clone https://github.com/shlomif/PySolFC.git
$ cd PySolFC
# install manually
$ mv -v html-src data/html
$ mv -v pysol.py data/
$ mv -v pysollib data/
$ mv -v po data/
$ mv -v data ~/PySolFC
# get cardsets
https://sourceforge.net/projects/pysolfc/files/PySolFC-Cardsets/
put content into ~/.PySolFC/cardsets/ or ~/PySolFC/cardsets/
# get music
https://sourceforge.net/projects/pysolfc/files/PySol-Music/
put content into ~/.PySolFC/music/ or ~/PySolFC/music/
# play
$ cd ~/PySolFC
$ ./pysol.py
The linux-install.py still doesn't work though...
I've always just done a manual install myself, but I took a look at the script and believe I noticed a few problems. It should work now with the latest code. Tested on my Debian box, and it doesn't error now, but I wouldn't call that a complete test as my development copy of PySolFC is already installed there.
I'm testing in a lxc (linux container) so i can test in a clean install in just a couple of seconds
A new error appears:
AttributeError: module 'os' has no attribute 'getCwd'
That was the result of me trying to check if the script is being run from in the scripts folder or not, so it could run from both places. I removed the check, so that should be good now.
The README says that python pysol.py should work from the source directory, without any installation.
Is this still accurate? If not, it should be updated.
The README says that
python pysol.pyshould work from the source directory, without any installation.Is this still accurate? If not, it should be updated.
Assuming that Python and all of the required libraries were installed separately, this is correct. It's what I do when I'm testing the code.
Assuming that Python and all of the required libraries were installed separately, this is correct. It's what I do when I'm testing the code.
I've had the same issue as @z0rti, having to copy (or softlink) the html and image directories into the root directory. Are we doing something wrong, or is it an undocumented step which is required for running from the source directory?
Assuming that Python and all of the required libraries were installed separately, this is correct. It's what I do when I'm testing the code.
I've had the same issue as @z0rti, having to copy (or softlink) the html and image directories into the root directory. Are we doing something wrong, or is it an undocumented step which is required for running from the source directory?
I'm afraid I have not run across any issues with the image directory. Can you confirm for me which files are missing?
As for the HTML, there is an additional step, though it is only necessary if you're trying to run from the latest source code from GitHub, as these files come pre-generated in the packages on SourceForge and AppVeyor. The HTML files need to be generated. The easiest way to do this is to execute the console command "gmake rules" or "make rules", depending on which tool is installed in your environment. I'll add this detail to the readme later.
Actually, I just double-checked and "gmake rules" is listed in the build steps in the readme, but I suppose that section could use a revision for clarity.
I missed the "After following steps similar to these", perhaps because the section is titled "Running from source without installation", but the instructions below involve installing things, so I thought they were a separate guide.
I suggest this change: Move the first instruction python pysol.py to the bottom of that section (It's already in the bottom sequence of "build PySol" commands, so it should be separated from them.