python-tksvg icon indicating copy to clipboard operation
python-tksvg copied to clipboard

pip installation in isolated mode causes build errors

Open ghost opened this issue 2 years ago • 5 comments

  • macOS 12.6.6
  • Python 3.11.3
  • pip 23.1.2

Running pip3 install tksvg (without an environment) gives me this:

Collecting tksvg
  Using cached tksvg-0.7.4.tar.gz (50 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [14 lines of output]
      Installing dependency cmake... Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/private/var/folders/9m/b3t01c7x13sfcnk6rqs5pr2c0000gp/T/pip-install-wpxcvtls/tksvg_f11d40390e6440e8a94f27ed11b96779/setup.py", line 62, in <module>
          sp.call(["pacman", "--needed", "--noconfirm", "-S", "mingw-w64-x86_64-{}".format(dep)])  # , stdout=sp.PIPE)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 389, in call
          with Popen(*popenargs, **kwargs) as p:
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1024, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/Library/Frameworks/Python.framework/Versions/3.11/lib/python3.11/subprocess.py", line 1917, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      FileNotFoundError: [Errno 2] No such file or directory: 'pacman'
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

ghost avatar Jun 19 '23 01:06 ghost

Same here: Linux Mint 20.1 Python 3.10

avalon60 avatar Jun 24 '23 11:06 avalon60

Thank you for posting and also verifying that the proposed work-around fixes the issue 🙂 .

RedFantom avatar Jul 13 '23 13:07 RedFantom

@RedFantom I'm actually yet to try that solution, completely forgot! 😦, I'll get back to you if it works.

ghost avatar Jul 13 '23 14:07 ghost

Just tried out the workaround, it doesn't work on my end.

ghost avatar Jul 13 '23 21:07 ghost

Note -- if you can ditch scikit-build-core you will save from bringing in a lot of unnecessary dependencies. Recently completed a branch of TkFontAwesome where I used hatch as the build engine and the number of dependencies dropped significantly!

mizraith avatar May 04 '24 17:05 mizraith

Fixed by #6

rdbende avatar Sep 24 '24 10:09 rdbende