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

installation issues: 2x failed install, deleted choosenim cache. #148

Closed
shirleyquirk opened this issue May 7, 2021 · 6 comments
Closed

Comments

@shirleyquirk
Copy link

shirleyquirk commented May 7, 2021

on Arch, completely fresh pip installation

pip -V
pip 20.3.1 from /usr/lib/python3.9/site-packages/pip (python 3.9)

pip install faster-than-requests

Defaulting to user installation because normal site-packages is not writeable
Collecting faster-than-requests
  Downloading faster_than_requests-3572925.zip (1.7 MB)
     |████████████████████████████████| 1.7 MB 365 kB/s 
ERROR: Requested faster-than-requests from https://files.pythonhosted.org/packages/8f/f0/11be00462bf64c327f73fb2696fc8f0c9e0cd495369569f0f0d6cded5c55/faster_than_requests-3572925.zip#sha256=24f9b9d9fb81dbfac8af4ff3672bed0d99b566e7d64f4efeb8bf96932a4700d4 has different version in metadata: '20.10.19'

pip install faster-than-requests --isolated --disable-pip-version-check --no-cache-dir --no-binary :all:
Same error

some googling, some error messages, i figure out a recent version

pip install faster-than-requests==21.3.3 --isolated --disable-pip-version-check --no-cache-dir --no-binary :all:

Defaulting to user installation because normal site-packages is not writeable
Collecting faster-than-requests==21.3.3
  Downloading faster_than_requests-21.03.03.zip (4.9 MB)
     |████████████████████████████████| 4.9 MB 49 kB/s 
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-bv4rw1k1/faster-than-requests_e6780c42abe9435aa3553d5f39c05f5d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-bv4rw1k1/faster-than-requests_e6780c42abe9435aa3553d5f39c05f5d/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 /tmp/pip-pip-egg-info-ia0zpc0n
         cwd: /tmp/pip-install-bv4rw1k1/faster-than-requests_e6780c42abe9435aa3553d5f39c05f5d/
    Complete output (44 lines):
    WARNING: The wheel package is not available.
      ERROR: Command errored out with exit status 1:
       command: /usr/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-wheel-lxnl7865/choosenim-install_2ea2cc1d007540b6b320e7cfd4b97ff2/setup.py'"'"'; __file__='"'"'/tmp/pip-wheel-lxnl7865/choosenim-install_2ea2cc1d007540b6b320e7cfd4b97ff2/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-4tgqti50
           cwd: /tmp/pip-wheel-lxnl7865/choosenim-install_2ea2cc1d007540b6b320e7cfd4b97ff2/
      Complete output (6 lines):
      usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
         or: setup.py --help [cmd1 cmd2 ...]
         or: setup.py --help-commands
         or: setup.py cmd --help
    
      error: invalid command 'bdist_wheel'
      ----------------------------------------
      ERROR: Failed building wheel for choosenim-install
    ERROR: Failed to build one or more wheels
    Traceback (most recent call last):
      File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 75, in fetch_build_egg
        subprocess.check_call(cmd)
      File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
        raise CalledProcessError(retcode, cmd)
    subprocess.CalledProcessError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp8mwxgce0', '--quiet', 'choosenim_install']' returned non-zero exit status 1.
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-bv4rw1k1/faster-than-requests_e6780c42abe9435aa3553d5f39c05f5d/setup.py", line 2, in <module>
        setuptools.setup(package_data = {"": ["*.nim", "*.nims", "*.cfg", "*.dll", "*.so", "*.h", "*.hpp"]})
      File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 152, in setup
        _install_setup_requires(attrs)
      File "/usr/lib/python3.9/site-packages/setuptools/__init__.py", line 147, in _install_setup_requires
        dist.fetch_build_eggs(dist.setup_requires)
      File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 721, in fetch_build_eggs
        resolved_dists = pkg_resources.working_set.resolve(
      File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 766, in resolve
        dist = best[req.key] = env.best_match(
      File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1051, in best_match
        return self.obtain(req, installer)
      File "/usr/lib/python3.9/site-packages/pkg_resources/__init__.py", line 1063, in obtain
        return installer(requirement)
      File "/usr/lib/python3.9/site-packages/setuptools/dist.py", line 780, in fetch_build_egg
        return fetch_build_egg(self, req)
      File "/usr/lib/python3.9/site-packages/setuptools/installer.py", line 77, in fetch_build_egg
        raise DistutilsError(str(e)) from e
    distutils.errors.DistutilsError: Command '['/usr/bin/python', '-m', 'pip', '--disable-pip-version-check', 'wheel', '--no-deps', '-w', '/tmp/tmp8mwxgce0', '--quiet', 'choosenim_install']' returned non-zero exit status 1.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

pip install wheel
pip install faster-than-requests=21.3.3

works! great. but I saw a 'choosenim_install' in there, i guess there was some compilation going on, and i'm sure it's changed my choosenim from devel to stable, let me see if i need to switch it back:

choosenim show

    Prompt: Can choosenim record and send anonymised telemetry data? [y/n]
        ... Anonymous aggregate user analytics allow us to prioritise
        ... fixes and features based on how, where and when people use Nim.
        ... For more details see: https://goo.gl/NzUEPf.

You deleted my choosenim?! how incredibly rude!

@juancarlospaco
Copy link
Owner

Choosenim deleted fixed by juancarlospaco/choosenim_install@f195e7e

The problem was some people have problems with broken choosenim, but I guess they can delete it themselves.

@juancarlospaco
Copy link
Owner

ERROR: has different version in metadata: '20.10.19'

Thats a PIP/Pypi Bug that they never fixed, file is there in the server, but server fails to serve it.

  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for choosenim-install
ERROR: Failed to build one or more wheels

Thats a PIP Bug that they never fixed, PIP depends on wheel package internally, but they do not directly depend on it.
So you should install it by yourself if you have errors or warnings.
This is Pythons run-time import resolution, kinda try: import wheel except: ... but often fails.
Nim or pure Python code wont need wheel but still PIP fails if you do not have it installed, or not, no way to know until you run it.

works! great.

Awesome.

You deleted my choosenim?! how incredibly rude!

It sucks, but it is fixed now.

@juancarlospaco
Copy link
Owner

Any improvement or change you want to make send Pull Request, I will merge.

I hope that responds all questions.

@shirleyquirk
Copy link
Author

thanks for the quick fix! i do get that pip bugs are out of your control, (same goes for choosenim bugs, i've certainly had a couple broken installs) The choosenim deletion is only a tiny inconvenience, and only relevant for those of us who keep a bunch of versions around for testing (and have slow internet heh), and needs to be balanced against making this package work well for python users.
I'll think about anything else i can do that might make this better and submit a pr if i come up with something.
Cheers

@juancarlospaco
Copy link
Owner

About choosenim Bugs, feel free to give feedback/comments here: nim-lang/RFCs#374 (comment)

About PIP Bugs, I tried to make a PIP that just works here, needs work: https://github.com/juancarlospaco/plz

:)

@shirleyquirk
Copy link
Author

pip is supposed to fallback to a setup.py if wheel isn't found, it does this for nimporter for example, maybe that's something i could add. the failure of pip install faster-than-requests without specifying the version is infuriating, my sympathies.

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

2 participants