israel-dryer / TkFontAwesome

Use any of the 1k+ free FontAwesome icons in your tkinter application.
MIT License
61 stars 11 forks source link

Can't seem to install this library anymore #7

Open avalon60 opened 1 year ago

avalon60 commented 1 year ago

Hi @israel-dryer. I get this when trying to install via PyCharm:


Collecting tkfontawesome
  Using cached tkfontawesome-0.2.0-py3-none-any.whl (405 kB)
Collecting lxml==4.7.1 (from tkfontawesome)
  Using cached lxml-4.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (6.9 MB)
Collecting tksvg==0.7.4 (from tkfontawesome)
  Using cached tksvg-0.7.4.tar.gz (50 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'

  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [8 lines of output]
      scikit-build is required to build this project
      install with `python -m pip install scikit-build`
      Traceback (most recent call last):
        File "<string>", line 2, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-jr4vv2q1/tksvg_afc2a3ceb73d44ea9268c70b9d76a4bb/setup.py", line 28, in <module>
          from skbuild import setup
      ModuleNotFoundError: No module named 'skbuild'
      [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.

I am on Linux Mint 21.1 (which is based on Ubuntu).

avalon60 commented 1 year ago

I tried installing the scikit-build library, and then again tried to install tkfontawesome, but then I got:

Defaulting to user installation because normal site-packages is not writeable
Collecting tkfontawesome
  Using cached tkfontawesome-0.2.0-py3-none-any.whl (405 kB)
Collecting lxml==4.7.1 (from tkfontawesome)
  Using cached lxml-4.7.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_24_x86_64.whl (6.9 MB)
Collecting tksvg==0.7.4 (from tkfontawesome)
  Using cached tksvg-0.7.4.tar.gz (50 kB)
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'done'
Requirement already satisfied: scikit-build in /home/clive/.local/lib/python3.10/site-packages (from tksvg==0.7.4->tkfontawesome) (0.17.6)
Requirement already satisfied: distro in /usr/lib/python3/dist-packages (from scikit-build->tksvg==0.7.4->tkfontawesome) (1.7.0)
Requirement already satisfied: packaging in /usr/lib/python3/dist-packages (from scikit-build->tksvg==0.7.4->tkfontawesome) (21.3)
Requirement already satisfied: setuptools>=42.0.0 in /usr/lib/python3/dist-packages (from scikit-build->tksvg==0.7.4->tkfontawesome) (59.6.0)
Requirement already satisfied: tomli in /home/clive/.local/lib/python3.10/site-packages (from scikit-build->tksvg==0.7.4->tkfontawesome) (2.0.1)
Requirement already satisfied: wheel>=0.32.0 in /usr/lib/python3/dist-packages (from scikit-build->tksvg==0.7.4->tkfontawesome) (0.37.1)
Building wheels for collected packages: tksvg
  Building wheel for tksvg (setup.py): started
  Building wheel for tksvg (setup.py): finished with status 'error'
  Running setup.py clean for tksvg
Failed to build tksvg

  error: subprocess-exited-with-error

  × python setup.py bdist_wheel did not run successfully.
  │ exit code: 1
  ╰─> [13 lines of output]
      /usr/lib/python3.10/distutils/dist.py:274: UserWarning: Unknown distribution option: 'cmdClass'
        warnings.warn(msg)
      /usr/lib/python3/dist-packages/setuptools/dist.py:493: UserWarning: Normalizing 'v0.7.4' to '0.7.4'
        warnings.warn(tmpl.format(**locals()))
      Traceback (most recent call last):
        File "/home/clive/.local/lib/python3.10/site-packages/skbuild/setuptools_wrap.py", line 645, in setup
          cmkr = cmaker.CMaker(cmake_executable)
        File "/home/clive/.local/lib/python3.10/site-packages/skbuild/cmaker.py", line 148, in __init__
          self.cmake_version = get_cmake_version(self.cmake_executable)
        File "/home/clive/.local/lib/python3.10/site-packages/skbuild/cmaker.py", line 105, in get_cmake_version
          raise SKBuildError(msg) from err

      Problem with the CMake installation, aborting build. CMake executable is cmake
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for tksvg
ERROR: Could not build wheels for tksvg, which is required to install pyproject.toml-based projects
ghost commented 1 year ago

On macOS 12.6.6, pip 23.1.2, Python 3.11.3:

Running pip3 install tkfontawesome:

Collecting tkfontawesome
  Downloading tkfontawesome-0.2.0-py3-none-any.whl (405 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 406.0/406.0 kB 3.7 MB/s eta 0:00:00
Collecting lxml==4.7.1 (from tkfontawesome)
  Downloading lxml-4.7.1.tar.gz (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 5.8 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting tksvg==0.7.4 (from tkfontawesome)
  Downloading tksvg-0.7.4.tar.gz (50 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 50.4/50.4 kB 1.4 MB/s eta 0:00:00
  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-5fmtmos2/tksvg_1a7d63398dd2467cb4ec91412389b1a8/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.

I then installed scikit-build and tried to install tkfontawesome again and got:

Collecting tkfontawesome
  Using cached tkfontawesome-0.2.0-py3-none-any.whl (405 kB)
Collecting lxml==4.7.1 (from tkfontawesome)
  Using cached lxml-4.7.1.tar.gz (3.2 MB)
  Preparing metadata (setup.py) ... done
Collecting tksvg==0.7.4 (from tkfontawesome)
  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-ff9xfv6h/tksvg_b820f6dfc10746ed9338a3be90936467/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.

Which is different from what @avalon60 got.

ghost commented 1 year ago

@avalon60 - I'd suggest closing this as "not planned" because none of these errors are a result of tkfontawesome. For me, I got an error with tksvg. I try to install tksvg and still get an error. That is why I opened an issue in the tksvg repository.

You might want to open an issue in the skbuild repository as it looks like that's where you error is coming from.

avalon60 commented 1 year ago

@avalon60 - I'd suggest closing this as "not planned" because none of these errors are a result of tkfontawesome. For me, I got an error with tksvg. I try to install tksvg and still get an error. That is why I opened an issue in the tksvg repository.

You might want to open an issue in the skbuild repository as it looks like that's where you error is coming from.

Hi @dishb - I have opened an issue on the scikit-build repo.

henryiii commented 1 year ago

The problem is this library doesn't have a pyproject.toml. Pip now builds in isolated mode by default, which means that it's incorrectly setting up the environment. (In Python 3.12, both distutils and setuptools won't be in default environments either, by the way!) Either a pyproject.toml should be added with the following content:

[build-system]
requires = ["setuptools", "scikit-build"]
build-backend = "setuptools.build_meta"

or you can pass --no-build-isolation (if using pip) / --no-isolation (if using build).

ghost commented 1 year ago

@henryiii - Thank you.

ghost commented 1 year ago

Still getting an error following @henryiii's suggestion...

pip3 install --no-build-isolation tkfontawesome
Collecting tkfontawesome
  Downloading tkfontawesome-0.2.0-py3-none-any.whl (405 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 406.0/406.0 kB 2.3 MB/s eta 0:00:00
Collecting lxml==4.7.1 (from tkfontawesome)
  Downloading lxml-4.7.1.tar.gz (3.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.2/3.2 MB 5.5 MB/s eta 0:00:00
  Preparing metadata (pyproject.toml) ... error
  error: subprocess-exited-with-error

  × Preparing metadata (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [18 lines of output]
      Building lxml version 4.7.1.
      Building without Cython.
      Building against libxml2 2.9.4 and libxslt 1.1.29
      Building against libxml2/libxslt in the following directory: /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/lib
      running dist_info
      creating /private/var/folders/9m/b3t01c7x13sfcnk6rqs5pr2c0000gp/T/pip-modern-metadata-rp3necgh/lxml.egg-info
      writing /private/var/folders/9m/b3t01c7x13sfcnk6rqs5pr2c0000gp/T/pip-modern-metadata-rp3necgh/lxml.egg-info/PKG-INFO
      writing dependency_links to /private/var/folders/9m/b3t01c7x13sfcnk6rqs5pr2c0000gp/T/pip-modern-metadata-rp3necgh/lxml.egg-info/dependency_links.txt
      writing requirements to /private/var/folders/9m/b3t01c7x13sfcnk6rqs5pr2c0000gp/T/pip-modern-metadata-rp3necgh/lxml.egg-info/requires.txt
      writing top-level names to /private/var/folders/9m/b3t01c7x13sfcnk6rqs5pr2c0000gp/T/pip-modern-metadata-rp3necgh/lxml.egg-info/top_level.txt
      writing manifest file '/private/var/folders/9m/b3t01c7x13sfcnk6rqs5pr2c0000gp/T/pip-modern-metadata-rp3necgh/lxml.egg-info/SOURCES.txt'
      reading manifest file '/private/var/folders/9m/b3t01c7x13sfcnk6rqs5pr2c0000gp/T/pip-modern-metadata-rp3necgh/lxml.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      adding license file 'LICENSE.txt'
      adding license file 'LICENSES.txt'
      writing manifest file '/private/var/folders/9m/b3t01c7x13sfcnk6rqs5pr2c0000gp/T/pip-modern-metadata-rp3necgh/lxml.egg-info/SOURCES.txt'
      creating '/private/var/folders/9m/b3t01c7x13sfcnk6rqs5pr2c0000gp/T/pip-modern-metadata-rp3necgh/lxml-4.7.1.dist-info'
      error: invalid command 'bdist_wheel'
      [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.
can-kat commented 11 months ago

Same issue for me any fixes or alternative lib?

Mews commented 2 months ago

Very late reply but in my case I fixed it by installing it like this pip install --no-deps tkfontawesome and installing the dependencies manually (the dependencies being tksvg and lxml). Not sure why it fixed it but I'm leaving this here anyway.