tartley / colorama

Simple cross-platform colored terminal text in Python
BSD 3-Clause "New" or "Revised" License
3.51k stars 250 forks source link

impossible to install colorama #240

Closed ericLemanissier closed 4 years ago

ericLemanissier commented 4 years ago

since few minutes, it seems to be impossible to install colorama:

pip3 install --upgrade colorama
Collecting colorama
  Using cached https://files.pythonhosted.org/packages/cb/fe/bfc4d807aa43a183ab387340f524a0bb086624f2c5935bd08e647b54b269/colorama-0.4.2.tar.gz
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-build-s_73iow0/colorama/setup.py", line 36, in <module>
        long_description=read_file('README.rst'),
      File "/tmp/pip-build-s_73iow0/colorama/setup.py", line 18, in read_file
        with open(os.path.join(os.path.dirname(__file__), path)) as fp:
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-build-s_73iow0/colorama/README.rst'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-s_73iow0/colorama/
ellbosch commented 4 years ago

I'm getting this error in Windows.

vphilippon commented 4 years ago

README.rst is somehow missing from the sdist (colorama-0.4.2.tar.gz), causing this error, and no wheel is available either.

techied commented 4 years ago

Having this issue with Ubuntu as well.

podwhitehawk commented 4 years ago

hm, latest version in master is set to v0.4.1 https://github.com/tartley/colorama/blob/master/colorama/__init__.py

techied commented 4 years ago

pypi shows 0.4.2 currently

podwhitehawk commented 4 years ago

no 0.4.2 tag either https://github.com/tartley/colorama/tags

BradenM commented 4 years ago

Also experiencing this.

Here is a log from tox running on the windows-latest environment via github actions:

Collecting colorama<0.5.0,>=0.4.1; sys_platform == "win32"
  Downloading https://files.pythonhosted.org/packages/cb/fe/bfc4d807aa43a183ab387340f524a0bb086624f2c5935bd08e647b54b269/colorama-0.4.2.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'D:\a\micropy-cli\micropy-cli\.tox\py37\Scripts\python.EXE' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\pip-install-jdcxa2nb\\colorama\\setup.py'"'"'; __file__='"'"'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\pip-install-jdcxa2nb\\colorama\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\RUNNER~1\AppData\Local\Temp\pip-install-jdcxa2nb\colorama\pip-egg-info'
         cwd: C:\Users\RUNNER~1\AppData\Local\Temp\pip-install-jdcxa2nb\colorama\
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "C:\Users\RUNNER~1\AppData\Local\Temp\pip-install-jdcxa2nb\colorama\setup.py", line 36, in <module>
        long_description=read_file('README.rst'),
      File "C:\Users\RUNNER~1\AppData\Local\Temp\pip-install-jdcxa2nb\colorama\setup.py", line 18, in read_file
        with open(os.path.join(os.path.dirname(__file__), path)) as fp:
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\pip-install-jdcxa2nb\\colorama\\README.rst'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

Link to full action

I downloaded the archive from the link, the README.rst is indeed not present.

geerlingguy commented 4 years ago

This has blown up all Travis CI builds for my open source projects too :(

See: https://travis-ci.org/geerlingguy/ansible-role-drupal/jobs/621774964#L217-L225

Looks like it's a dependency of molecule, in my case, used for testing Ansible roles.

techied commented 4 years ago

For now I suppose a workaround is to just use 0.4.1?

qjflores commented 4 years ago

this is breaking pytest-watch

AXington commented 4 years ago

This is a pretty big deal, it's breaking a lot of dependencies.

ericLemanissier commented 4 years ago

more precisely, the workaround is pip(3) install --upgrade colorama==0.4.1 whatever_you_wanted_to_install

techied commented 4 years ago

Unfortunately it is not always so simple to choose a different version

geerlingguy commented 4 years ago

It looks like 0.4.3 was just released a few minutes ago. My builds are succeeding again, yay!

https://github.com/tartley/colorama/releases/tag/0.4.3

techied commented 4 years ago

It should be resolved now according to @geerlingguy

Edit: It's not really a great idea to pull a release from pypi because this could cause more problems than it would solve

tartley commented 4 years ago

This was all my fault. Apologies people.

I didn't realize the existence of the github tag was so critical - I'll go read about why. (clues appreciated)

and I don't know why the README.rst was missing from 0.4.2. Seems to be present in 0.4.3 though. I'll double check both the wheel and the sdist to be sure...

AXington commented 4 years ago

can confirm that this seems to be resolved now, however, I've changed my requirements.txt in several repos to include: colorama>=0.4.1,!=0.4.2

also @tartley not sure why/if that affected this last build, but typically tags are used to have a snapshot of releases so that a build can be reproduced if need be, or hotfixes applied, etc.

tartley commented 4 years ago

@AXington Thank you. I created the tag locally, just didn't push to github for a few minutes.

I tracked down some more diagnostic info about the missing README.rst:

This 0.4.2 sdist was built using my default python, 3.8, which produces an sdist without the README.rst. We have a makefile target to push both sdist and wheel to PyPI, and the sdist worked, but the wheel failed, so there was a period where there was no wheel, and in falling back to the sdist you saw the missing README file error.

I then built an 0.4.3 sdist using Python 3.6, which does include the README (I confirmed), and fixed the problem with wheel uploads.

tartley commented 4 years ago

I'll keep digging to find out all the details, so we can strive to avoid this happening again.

tartley commented 4 years ago

@wiggin15 When you wake:

  1. Sorreeee! :-)
  2. Extra my fault because I bypassed uploading to test.pypi.org (which I'll never do again) because I don't have privs to the 'colorama' package there. Can you remember how I get it? (ie how did we add you to 'colorama' on 'pypi.org'?)
tartley commented 4 years ago
  1. Bloody deadlines. Was trying to get this published in time for the tidelift deadline, that ends today, and so I rushed it. Stupid.
jrosser commented 4 years ago

This broke openstack CI too - here is some really good advice about what to do with already released broken packages https://doughellmann.com/blog/2016/02/25/so-youve-released-a-broken-package-to-pypi-what-do-you-do-now/

0.4.2 will be in everyones mirrors for a long time now and won't go away

nightlark commented 4 years ago

Well, a new release that excludes Python 3.4 explains why our CI builds started failing on pip3 install pytest. I noticed that this release (unlike previous releases) says that it Requires: Python >=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.* -- does colorama actually no longer work with Python 3.4, or was that requirement added for other reasons (e.g. deprecating support for older Python versions)?

If semantic versioning is being followed, I'd expect anything in the 0.4.x series to continue working with the same Python versions.

wiggin15 commented 4 years ago
  1. Extra my fault because I bypassed uploading to test.pypi.org (which I'll never do again) because I don't have privs to the 'colorama' package there. Can you remember how I get it? (ie how did we add you to 'colorama' on 'pypi.org'?)

@tartley I added you as an owner of the colorama project on test.pypi.org (apparently I was the "sole owner". I don't know why).

jongiddy commented 4 years ago

Also, please update the CHANGELOG.rst to indicate the changes for both new versions, so we can see what's new in 0.4.2 and why the fix in 0.4.3 was released on the same day.

jayvdb commented 4 years ago

Related issue: https://github.com/tartley/colorama/issues/243

wiggin15 commented 4 years ago

Original problem was fixed by release 0.4.3. Python 3.4 is EOL and was intentionally removed.

theoturner commented 3 years ago

Could not install or uninstall 0.4.4. Just go to your site packages and remove any colorama directories, then reinstall.