Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pip install colout is broken for everyone #101

Closed
tartley opened this issue Sep 10, 2018 · 20 comments
Closed

pip install colout is broken for everyone #101

tartley opened this issue Sep 10, 2018 · 20 comments

Comments

@tartley
Copy link

tartley commented Sep 10, 2018

setup.py tries to read 'README.md', but no such file exists in the source dist package on PyPI.

$ python3.7 -mpip install --user colout
Collecting colout
  Downloading https://files.pythonhosted.org/packages/3d/ba/3ef31c0df3ace69271cc8b1af6b529f24de66ff42c0d99a8d18aa980a307/colout-0.5.tar.gz (47kB)
    100% |████████████████████████████████| 51kB 736kB/s 
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-gfp0x0mf/colout/setup.py", line 25, in <module>
        long_description=open('README.md').read(),
    FileNotFoundError: [Errno 2] No such file or directory: 'README.md'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-gfp0x0mf/colout/

This is not limited to py3.7. Earlier versions fail in the same way.

@tartley
Copy link
Author

tartley commented Sep 10, 2018

Thank you SO MUCH for colout! I use it and love it every single day, and have done so for years.

I know it's hard maintaining old software. Would a PR help?

@tartley
Copy link
Author

tartley commented Sep 10, 2018

I see 'README.md' is mentioned in MANIFEST.in. Perhaps all that's needed is a new release pushing up to PyPI?

@tartley
Copy link
Author

tartley commented Sep 10, 2018

If I create a README.md, "pip install ." still fails, looking for a LICENSE file. This is also missing from PyPI, but is mentioned in MANIFEST.in

@jquast
Copy link
Contributor

jquast commented Oct 8, 2018

I made PR #102 to suggest a small fix

@tartley
Copy link
Author

tartley commented Oct 8, 2018

@jquast Nice work, especially the part where you ignored my foolish misdirection about the MANIFEST.in. 👍

@jquast
Copy link
Contributor

jquast commented Oct 8, 2018

No problem :-) I just noticed we write similar libraries, 'blessed' and 'colorama', greetings!

@tartley
Copy link
Author

tartley commented Oct 8, 2018

Backatcha! Love Blessings so much. FWIW, I wish I'd never included the functionality in Colorama to generate ANSI codes. It's obviously way better to encourage people to use far superior stuff like blessings. Do one thing well. But i retired from the project (I don't use Windows any more) and backwards compatibility.

I created a humble thing using blessings. You must see far better things, but if you "pip install --user cbeams ; cbeams", it's kinda fun.

@tartley
Copy link
Author

tartley commented Oct 25, 2018

I did some experiments:

Current pip release is 0.5
Current github master also includes 0.6 and 0.6.1
The problem with the manifest.in was fixed in a commit prior to v0.6

If I upload a new pypi package "colout-fix", using source after this, then I can pip install it successfully.

All that is required is a new release (of 0.6 or 0.6.1) to PyPI.

@raytry
Copy link

raytry commented Nov 7, 2018

This method solved the problem for me:
pip install --force-reinstall git+https://github.com/stdedos/colout.git
Found this solution here: https://stackoverflow.com/questions/41695779/ioerror-errno-2-no-such-file-or-directory-readme-md#41695939

@tartley
Copy link
Author

tartley commented Jan 25, 2019

Worth noting that raytry's solution (which works for me) quotes a fork of the repo, not this (nojhan's) original. Should probably be:

pip install --user --force-reinstall git+https://github.com/nojhan/colout.git

(I added a --user as well. So you can install tools like this globally without needing a virtualenv, without needing sudo, and without modifying your system wide installed libraries.)

@evandrocoan
Copy link

# pip3 install --force-reinstall git+https://github.com/nojhan/colout.git -v
Downloading/unpacking git+https://github.com/nojhan/colout.git
  Cloning https://github.com/nojhan/colout.git to /tmp/pip-ppgqwk0v-build
  Found command 'git' at '/usr/bin/git'
  Running setup.py (path:/tmp/pip-ppgqwk0v-build/setup.py) egg_info for package from git+https://github.com/nojhan/colout.git
    error in colout setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers
    Complete output from command python setup.py egg_info:
    error in colout setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers

----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /tmp/pip-ppgqwk0v-build
Exception information:
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/pip/basecommand.py", line 122, in main
    status = self.run(options, args)
  File "/usr/lib/python3/dist-packages/pip/commands/install.py", line 290, in run
    requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
  File "/usr/lib/python3/dist-packages/pip/req.py", line 1230, in prepare_files
    req_to_install.run_egg_info()
  File "/usr/lib/python3/dist-packages/pip/req.py", line 326, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/lib/python3/dist-packages/pip/util.py", line 716, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command python setup.py egg_info failed with

@evandrocoan
Copy link

I fixed by editing your setup.py and changing:

requires = ['argparse; python_version < "2.7"', 'pygments', 'babel']
# -->
requires = ['argparse', 'pygments', 'babel']

@ferenczy
Copy link

ferenczy commented Oct 8, 2019

It looks like this project is abandoned, I guess it's time for a fork, what do you think?

@tartley
Copy link
Author

tartley commented Oct 10, 2019

time for a fork

Without the involvement and blessing of colout's author(s), I fear that's easily perceived as hostile, and I'd much rather try to be helpful to convey my massive gratitude.

It is frustrating though, that the fixes required to make this work have been merged for more than a year, but without a release, the package is still uninstallable from PyPI.

To be explicit: Of the README's listed install methods:

  • "setup.py install" does work, but it requires cloning the repo, then further fiddly manual steps.
  • "pip install colout" doesn't work for anyone, because of the reasons above.
  • "easy_install colout" doesn't work for anyone, for the same reasons.
  • apt install from PPA doesn't support the current Ubunut (19.04)

Perhaps it would help to add a sanity test that builds & installs an sdist or wheel, thus revealing packaging problems at test time, before they get merged.

@nojhan I'd love to help out! Are you seeing this? :-) Could you make a PyPI release, or maybe ask for volunteers to do the maintenance on the the PyPI package? Or just let us know whether you have a preferred resolution for all this, so we could pick up your fabulous work and help people use it? Best!

@tartley
Copy link
Author

tartley commented Oct 10, 2019

@ferenczy Be aware, there is an existing fork with some newer commits, here: https://github.com/stdedos/colout

Doesn't solve the problem of how to make a new PyPI release (without which, their install instructions don't work either) but maybe they could adopt a new PyPI package name, "neocolout" or something)

@jdevera
Copy link

jdevera commented Dec 14, 2019

@nojhan is this project abandoned?

@tartley tartley closed this as completed Feb 2, 2023
@tartley
Copy link
Author

tartley commented Feb 2, 2023

Closed since 'colout' gained working PyPI releases aaaaaaages ago now. Thank you!

@nojhan
Copy link
Owner

nojhan commented Feb 10, 2023

I have to confess I had a few bad years and did not follow this thread. Is there anything that need to be done on having an up-to-date pypi package?

@tartley
Copy link
Author

tartley commented Feb 11, 2023

No worries at all, I have open source packages of my own that have languished when times were tough, so I totally understand.

I think pip installs are 100% working fine as well, so you can forget all about this issue. Go! Have some fun! Get some rest! Everybody loves you.

@nojhan
Copy link
Owner

nojhan commented Feb 11, 2023

Man, this is the weirdest, yet kindest comment I've seen in a while 🤣

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants