News for hackers. Stuff that matters.
Re:Pyspread – The Most Pythonic Spreadsheet by kwhitefoot on Tuesday May 07, 2024 @08:26AM (#40284656)
I tried to install, and discovered yet again why I fell out of love with Python.

Executing:

pip3 install -r requirements.txt

gave this error:

" Traceback (most recent call last): File "/tmp/tmprhazpypn", line 126, in prepare_metadata_for_build_wheel hook = backend.prepare_metadata_for_build_wheel AttributeError: module 'sipbuild.api' has no attribute 'prepare_metadata_for_build_wheel'

...

ERROR: Command errored out with exit status 1: /usr/bin/python3 /tmp/tmprhazpypn prepare_metadata_for_build_wheel /tmp/tmpl72s0sfd Check the logs for full command output."

I'm on Linux Mint 19.

Re:Pyspread – The Most Pythonic Spreadsheet by sorenjan on Tuesday May 07, 2024 @09:14AM (#40285057)
Use pipx to install applications instead. It even works on Windows.

  > pipx install pyspread
      installed package pyspread 2.2.3, installed using Python 3.12.3
      These apps are now globally available
        - pyspread.exe
    done!
Re:Pyspread – The Most Pythonic Spreadsheet by kreddor on Tuesday May 07, 2024 @08:33AM (#40284722)
I tried to install it on ubuntu 22.04 and got a different error using pip. I'm not experienced enough with Python to quickly figure out how to proceed. It's a shame it isn't easier to install.
Re:Pyspread – The Most Pythonic Spreadsheet by ceving on Tuesday May 07, 2024 @10:06AM (#40285615)
Debian has it out of the box:

    $ LANG=C apt-cache policy pyspread
    pyspread:
      Installed: 2.2.3-1
      Candidate: 2.2.3-1
      Version table:
     *** 2.2.3-1 500
            500 http://ftp.de.debian.org/debian trixie/main amd64 Packages
            500 http://ftp.de.debian.org/debian trixie/main i386 Packages
            100 /var/lib/dpkg/status
Re:Pyspread – The Most Pythonic Spreadsheet by kwhitefoot on Tuesday May 07, 2024 @12:19PM (#40287681)
Thank you!
Re:Pyspread – The Most Pythonic Spreadsheet by Qem on Tuesday May 07, 2024 @08:57AM (#40284915)
Under Fedora 39 I was able to pip install and run it withhout problems, inside a venv environment:

    (pyspread) [xxxx@fedora ~]$ pip install pyspread
    Collecting pyspread
      Obtaining dependency information for pyspread from https://files.pythonhosted.org/packages/a5/e2/19ddb20b46ae46f11102f9095bf5bf00cb28cc79b35f38257f84a98ecd1d/pyspread-2.2.3-py3-none-any.whl.metadata
      Downloading pyspread-2.2.3-py3-none-any.whl.metadata (4.8 kB)
    Collecting PyQt5>=5.10 (from pyspread)
      Obtaining dependency information for PyQt5>=5.10 from https://files.pythonhosted.org/packages/2f/e6/a1f9853e4933c312c6de9c79d126c7d92ef69ae0e53895fb1ceb0ecc77a6/PyQt5-5.15.10-cp37-abi3-manylinux_2_17_x86_64.whl.metadata
      Downloading PyQt5-5.15.10-cp37-abi3-manylinux_2_17_x86_64.whl.metadata (2.1 kB)
    Collecting markdown2>=2.3 (from pyspread)
      Obtaining dependency information for markdown2>=2.3 from https://files.pythonhosted.org/packages/5a/09/a9ef8d5fe4b08bfd0dd133084deefcffc4b2a37a9ca35a22b48622d59262/markdown2-2.4.13-py2.py3-none-any.whl.metadata
      Downloading markdown2-2.4.13-py2.py3-none-any.whl.metadata (2.0 kB)
    Collecting numpy>=1.1 (from pyspread)
      Obtaining dependency information for numpy>=1.1 from https://files.pythonhosted.org/packages/0f/50/de23fde84e45f5c4fda2488c759b69990fd4512387a8632860f3ac9cd225/numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata
      Downloading numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (61 kB)
         ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 61.0/61.0 kB 311.8 kB/s eta 0:00:00
    Collecting setuptools>=40.0 (from pyspread)
      Obtaining dependency information for setuptools>=40.0 from https://files.pythonhosted.org/packages/f7/29/13965af254e3373bceae8fb9a0e6ea0d0e571171b80d6646932131d6439b/setuptools-69.5.1-py3-none-any.whl.metadata
      Downloading setuptools-69.5.1-py3-none-any.whl.metadata (6.2 kB)
    Collecting PyQt5-sip<13,>=12.13 (from PyQt5>=5.10->pyspread)
      Obtaining dependency information for PyQt5-sip<13,>=12.13 from https://files.pythonhosted.org/packages/3c/ab/f8f1e970768fcb4ab118d4aabbfcb9b7f781088b71e1f26d813fd51c4701/PyQt5_sip-12.13.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.whl.metadata
      Downloading PyQt5_sip-12.13.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.whl.metadata (504 bytes)
    Collecting PyQt5-Qt5>=5.15.2 (from PyQt5>=5.10->pyspread)
      Obtaining dependency information for PyQt5-Qt5>=5.15.2 from https://files.pythonhosted.org/packages/83/d4/241a6a518d0bcf0a9fcdcbad5edfed18d43e884317eab8d5230a2b27e206/PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl.metadata
      Downloading PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl.metadata (535 bytes)
    Downloading pyspread-2.2.3-py3-none-any.whl (1.7 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.7/1.7 MB 2.7 MB/s eta 0:00:00
    Downloading markdown2-2.4.13-py2.py3-none-any.whl (41 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 41.3/41.3 kB 169.4 kB/s eta 0:00:00
    Downloading numpy-1.26.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (18.0 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 18.0/18.0 MB 4.1 MB/s eta 0:00:00
    Downloading PyQt5-5.15.10-cp37-abi3-manylinux_2_17_x86_64.whl (8.2 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 8.2/8.2 MB 4.8 MB/s eta 0:00:00
    Downloading setuptools-69.5.1-py3-none-any.whl (894 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 894.6/894.6 kB 3.1 MB/s eta 0:00:00
    Downloading PyQt5_Qt5-5.15.2-py3-none-manylinux2014_x86_64.whl (59.9 MB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 59.9/59.9 MB 1.8 MB/s eta 0:00:00
    Downloading PyQt5_sip-12.13.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.whl (360 kB)
       ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 361.0/361.0 kB 2.0 MB/s eta 0:00:00
    Installing collected packages: PyQt5-Qt5, setuptools, PyQt5-sip, numpy, markdown2, PyQt5, pyspread
    Successfully installed PyQt5-5.15.10 PyQt5-Qt5-5.15.2 PyQt5-sip-12.13.0 markdown2-2.4.13 numpy-1.26.4 pyspread-2.2.3 setuptools-69.5.1

    [notice] A new release of pip is available: 23.2.1 -> 24.0
    [notice] To update, run: pip install --upgrade pip
    (pyspread) [xxxx@fedora ~]$ python3 -m pyspread
Re:Pyspread – The Most Pythonic Spreadsheet by resource_waste on Tuesday May 07, 2024 @10:19AM (#40285767)
Stop using debian-family.

Dealing with outdated/bugs is just a regular day under the guise of 'stable'.

The only reason you even are using Mint is because conical did a marketing trick sending free CDs in 2000s.

Re:Pyspread – The Most Pythonic Spreadsheet by amias on Tuesday May 07, 2024 @08:51AM (#40284858)
stop trying to use the system python for application development. You will break your OS and you will make your code machine specific. Go read up on Virtual Envs , you were the problem here.
Re:Pyspread – The Most Pythonic Spreadsheet by evilduck on Tuesday May 07, 2024 @09:34AM (#40285256)
Python has like a dozen competing solutions in their package management space. Python is clearly the problem, not the user.

Their docs don’t say that, they advertise exactly what the GP ran. Python needs to unfuck its ecosystem.

Re:Pyspread – The Most Pythonic Spreadsheet by smaudet on Tuesday May 07, 2024 @10:13AM (#40285698)
Yeah they kinda screwed the pooch on that.

That being said, venv is the official solution, and it works fairly well. pipenv/pipx are some alternatives...but yeah.

What exactly is your system installation for if you aren't supposed to install anything to it? The package system should be able to attempt installing via venv or be able to block uncompatible packages with sane error messages.

Re:Pyspread – The Most Pythonic Spreadsheet by tupolef on Tuesday May 07, 2024 @09:02AM (#40284954)
And for the lazy ones, pipx uses Virtual Envs and can install most things from a path, an archive or a package name. Install pipx and check pipx install --help.
Re:Pyspread – The Most Pythonic Spreadsheet by kwhitefoot on Tuesday May 07, 2024 @11:59AM (#40287387)
Why is this directed at me? I'm not the one doing the software development, I was just trying to install an application.
Re:Pyspread – The Most Pythonic Spreadsheet by UncleEntity on Tuesday May 07, 2024 @12:34PM (#40287954)
> stop trying to use the system python for application development.

Umm... who exactly makes sure the app runs correctly with the version of python installed by the system?

I, for one, aren't going to bump up a python version to run a single app in a virtual environment because some dev decided to use 'python nightly' to code against.

Re:Pyspread – The Most Pythonic Spreadsheet by adolph on Tuesday May 07, 2024 @10:49AM (#40286210)
venv not always a panacea for system python

  $ docker run --rm -it python bash
  [...]

  root@211646f0fa99:/# which python
  /usr/local/bin/python

  root@211646f0fa99:/# python -m venv .venv

  root@211646f0fa99:/# source .venv/bin/activate

  (.venv) root@211646f0fa99:/# which python
  /.venv/bin/python

  (.venv) root@211646f0fa99:/# ls -l "$(which python)"
  lrwxrwxrwx 1 root root 21 May  7 14:47 /.venv/bin/python -> /usr/local/bin/python
Re:Pyspread – The Most Pythonic Spreadsheet by metadat on Tuesday May 07, 2024 @12:05PM (#40287476)
Correct, virtualenv isolates package installation but doesn't handle installing or managing arbitrary Python versions.

Node.js is similar with npm.

Is there something like nvm but for Python?

Re:Pyspread – The Most Pythonic Spreadsheet by djd20 on Tuesday May 07, 2024 @01:42PM (#40288994)
Try pyenv - very handy, includes funkier editions like pypy
Re:Pyspread – The Most Pythonic Spreadsheet by sensen7 on Tuesday May 07, 2024 @01:35PM (#40288891)
If venvs were a reasonable solution here, presumably the pyspread authors would have included them in the installation instructions. Instead they just say to "pip install", which predictably does not work for most people. It sounds a bit unfair to tell someone that "they're the problem" when they followed the official installation instructions to the letter. I would agree in classifying this as another case of python developers being unable to provide a working way to install their software (if code that the average person can't even get to execute can even be called "software".)
Re:Pyspread – The Most Pythonic Spreadsheet by globular-toast on Tuesday May 07, 2024 @01:35PM (#40288902)
You're not really supposed to pip install applications. pip is a developer tool. There is pipx which is great, but I still think it's a developer tool. It's annoying when projects say to pip install stuff. It's never the right thing to do.
Re:Pyspread – The Most Pythonic Spreadsheet by pasc1878 on Tuesday May 07, 2024 @04:12PM (#40290931)
Compare this with the comments above re nix where it just ran - although to get a python app to build on nix is a pain but at least only one person has to do it.