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

[Ubuntu 18.04LTS] pip install fails #1893

Closed
rola93 opened this issue Dec 18, 2020 · 3 comments
Closed

[Ubuntu 18.04LTS] pip install fails #1893

rola93 opened this issue Dec 18, 2020 · 3 comments

Comments

@rola93
Copy link

rola93 commented Dec 18, 2020

Summary

  • OS: Ubuntu 18.04LTS

  • Architecture: 64bit

  • Psutil version: 5.7.2

  • Python version: 3.7.7

  • Type: installing via pip

Description

current psutil version is 5.7.3, however, it fail when installing:

 pip install psutil                                                                  2835  20:06:58  
ERROR:root:error loading spec /home/rola93/.pyenv/versions/3.7.7/envs/coral/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType
ERROR:root:error loading spec /home/rola93/.pyenv/versions/3.7.7/envs/coral/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType
Collecting psutil
  Using cached psutil-5.7.3.tar.gz (465 kB)
    ERROR: Command errored out with exit status 1:
     command: /home/rola93/.pyenv/versions/3.7.7/envs/coral/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-b1vyusfh/psutil_f809e441d67c426e8c64250859a500db/setup.py'"'"'; __file__='"'"'/tmp/pip-install-b1vyusfh/psutil_f809e441d67c426e8c64250859a500db/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-e1o2entl
         cwd: /tmp/pip-install-b1vyusfh/psutil_f809e441d67c426e8c64250859a500db/
    Complete output (11 lines):
    ERROR:root:error loading spec /home/rola93/.pyenv/versions/3.7.7/envs/coral/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType
    ERROR:root:error loading spec /home/rola93/.pyenv/versions/3.7.7/envs/coral/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-b1vyusfh/psutil_f809e441d67c426e8c64250859a500db/setup.py", line 442, in <module>
        main()
      File "/tmp/pip-install-b1vyusfh/psutil_f809e441d67c426e8c64250859a500db/setup.py", line 337, in main
        long_description=get_description(),
      File "/tmp/pip-install-b1vyusfh/psutil_f809e441d67c426e8c64250859a500db/setup.py", line 109, in get_description
        assert not stderr, stderr
    AssertionError: b'ERROR:root:error loading spec /home/rola93/.pyenv/versions/3.7.7/envs/coral/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType\nERROR:root:error loading spec /home/rola93/.pyenv/versions/3.7.7/envs/coral/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType\n'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

However, I could install it with pip install psutil==5.7.2:

 pip install psutil==5.7.2                                                       1 ↵  2839  20:11:41  
ERROR:root:error loading spec /home/rola93/.pyenv/versions/3.7.7/envs/coral/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType
ERROR:root:error loading spec /home/rola93/.pyenv/versions/3.7.7/envs/coral/share/vext/specs/gi.vext: expected str, bytes or os.PathLike object, not NoneType
Collecting psutil==5.7.2
  Using cached psutil-5.7.2-cp37-cp37m-linux_x86_64.whl
Installing collected packages: psutil
Successfully installed psutil-5.7.2
@rola93 rola93 added the bug label Dec 18, 2020
@github-actions github-actions bot added the linux label Dec 18, 2020
@giampaolo
Copy link
Owner

It looks like you have other issues with your environment (that looks weird). What happens if you try installing from latest master?

pip install -v git+https://github.com/giampaolo/psutil.git@master

@rola93
Copy link
Author

rola93 commented Dec 19, 2020

Thanks for your answer.

I can install it perfectly. How did you know it was my environment?

Thanks in advance

@giampaolo
Copy link
Owner

giampaolo commented Dec 19, 2020

Because of those weird b'ERROR:root:error loading spec /home/rola93/.pyenv/versions/3.7.7/envs/coral/share/vext/specs/gi.vext: expected str, bytes" messages piped to stderr, which are not part of psutil code base. =)
setup.py script in psutil 5.7.3 (but not on current master branch or 5.8.0) had a check which crashed installation if something was printed to stderr, but that was too strict so I got rid of it some time ago.

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

No branches or pull requests

2 participants