bedapisl / fast-colorthief

Selection of most dominant colors in image using Modified Median Cut Quantization
45 stars 1 forks source link

Cannot install from pip #6

Closed theahura closed 1 year ago

theahura commented 2 years ago

Hey hey,

Just wanted to flag that I am unable to install this package from pip. Tried pip install fast-colorthief and pip install fast_colorthief

Both had the following error:

Collecting fast-colorthief
  Using cached fast-colorthief-0.0.1.tar.gz (2.9 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/amol/code/soot/api-server/env/bin/python3 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-_rca88ao/fast-colorthief_c5418e19e570480baa34f64dee5257e5/setup.py'"'"'; __file__='"'"'/tmp/pip-install-_rca88ao/fast-colorthief_c5418e19e570480baa34f64dee5257e5/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-srv4ysty
         cwd: /tmp/pip-install-_rca88ao/fast-colorthief_c5418e19e570480baa34f64dee5257e5/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-_rca88ao/fast-colorthief_c5418e19e570480baa34f64dee5257e5/setup.py", line 12, in <module>
        import fast_colorthief
      File "/tmp/pip-install-_rca88ao/fast-colorthief_c5418e19e570480baa34f64dee5257e5/fast_colorthief.py", line 2, in <module>
        import fast_colorthief_backend
    ModuleNotFoundError: No module named 'fast_colorthief_backend'
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c4/d7/8244325daaf498c9ab2e1c3e3dbac75553ca33ae64abbf648d226ec29dee/fast-colorthief-0.0.1.tar.gz#sha256=68fa3b380aa2fd9aff0bfe7cfd01d1cb1cc1f855039b17375a3e152420c46267 (from https://pypi.org/simple/fast-colorthief/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement fast-colorthief (from versions: 0.0.1)
ERROR: No matching distribution found for fast-colorthief

This is throwing some internal error, but I also want to point out that the version number is 0.0.1 -- for some reason, pypi isn't distributing the 0.0.4 release.

bedapisl commented 2 years ago

What is the output of the command pip install fast-colorthief==0.0.4 for you? And what OS are you using?

theahura commented 2 years ago
ERROR: Could not find a version that satisfies the requirement fast-colorthief==0.0.4 (from versions: 0.0.1)
ERROR: No matching distribution found for fast-colorthief==0.0.4

On ubuntu, python 3.8.10

theahura commented 2 years ago

I got around this by running pip install git+https://github.com/bedapisl/fast-colorthief.git#egg=fast-colorthief

obviously not a fix for the bug but may help some other folks who are running into issues.

bedapisl commented 2 years ago

The problem is that I did not upload wheels for Python 3.8, with Python 3.7 it should work. I will fix it eventually, but now I have a lot of other work...

bedapisl commented 2 years ago

Should work now with Python 3.8, 3.9 and 3.10 on Linux.

vincentcox commented 2 years ago

Hello there,

I'm testing this on python 3.9 (Mac OS X), but I get the following error when trying to install with pip:

╭─vincentcox@Vincents-MacBook-Pro-5 ~
╰─$ python3 --version                                                                                                                                                                                                                           1 ↵
Python 3.9.7
╭─vincentcox@Vincents-MacBook-Pro-5 ~
╰─$ python3 -m pip install fast-colorthief
DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621
Collecting fast-colorthief
  Using cached fast-colorthief-0.0.1.tar.gz (2.9 kB)
  Preparing metadata (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /usr/local/opt/python@3.9/bin/python3.9 -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/ns/bldg0q9j6pzbpp94gb19h4780000gn/T/pip-install-8xsulz40/fast-colorthief_e99923a5b3bb4240a0d4aa2acc549d64/setup.py'"'"'; __file__='"'"'/private/var/folders/ns/bldg0q9j6pzbpp94gb19h4780000gn/T/pip-install-8xsulz40/fast-colorthief_e99923a5b3bb4240a0d4aa2acc549d64/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/ns/bldg0q9j6pzbpp94gb19h4780000gn/T/pip-pip-egg-info-_ioewuwu
       cwd: /private/var/folders/ns/bldg0q9j6pzbpp94gb19h4780000gn/T/pip-install-8xsulz40/fast-colorthief_e99923a5b3bb4240a0d4aa2acc549d64/
  Complete output (7 lines):
  Traceback (most recent call last):
    File "<string>", line 1, in <module>
    File "/private/var/folders/ns/bldg0q9j6pzbpp94gb19h4780000gn/T/pip-install-8xsulz40/fast-colorthief_e99923a5b3bb4240a0d4aa2acc549d64/setup.py", line 12, in <module>
      import fast_colorthief
    File "/private/var/folders/ns/bldg0q9j6pzbpp94gb19h4780000gn/T/pip-install-8xsulz40/fast-colorthief_e99923a5b3bb4240a0d4aa2acc549d64/fast_colorthief.py", line 2, in <module>
      import fast_colorthief_backend
  ModuleNotFoundError: No module named 'fast_colorthief_backend'
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/c4/d7/8244325daaf498c9ab2e1c3e3dbac75553ca33ae64abbf648d226ec29dee/fast-colorthief-0.0.1.tar.gz#sha256=68fa3b380aa2fd9aff0bfe7cfd01d1cb1cc1f855039b17375a3e152420c46267 (from https://pypi.org/simple/fast-colorthief/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement fast-colorthief (from versions: 0.0.1)
ERROR: No matching distribution found for fast-colorthief
bedapisl commented 2 years ago

Hello, would you install CMake and then try installing with:

git clone https://github.com/bedapisl/fast-colorthief
cd fast-colorthief
git submodule update --init --recursive
pip3 install .
diceroll123 commented 2 years ago

MacOS - Works if you do it that way after installing cmake and cloning, but pip install fast-colorthief shows the same ModuleNotFoundError: No module named 'fast_colorthief_backend' error.

Perhaps a github actions flow is in order?

imset commented 2 years ago

Confirming that the cmake/cloning process described above works but pip installing still fails in the same way on Windows 10

bedapisl commented 1 year ago

Hello, I have compiled and upload the package on Pypi for the following Python versions and Operating systems:

So from now on it should be working on basically any operating system with any Python version.