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

platform.linux_distribution not exists #31

Open
theduckchannel opened this issue Jul 29, 2020 · 2 comments
Open

platform.linux_distribution not exists #31

theduckchannel opened this issue Jul 29, 2020 · 2 comments

Comments

@theduckchannel
Copy link

the error:

Traceback (most recent call last):
File "/home/fredlins/.local/lib/python3.8/site-packages/py2deb/cli.py", line 200, in main
archives, relationships = converter.convert(arguments)
File "/home/fredlins/.local/lib/python3.8/site-packages/py2deb/converter.py", line 735, in convert
self.packages_to_convert = list(self.get_source_distributions(pip_install_arguments))
File "/home/fredlins/.local/lib/python3.8/site-packages/py2deb/converter.py", line 792, in get_source_distributions
for requirement in self.pip_accel.get_requirements(arguments):
File "/home/fredlins/.local/lib/python3.8/site-packages/pip_accel/init.py", line 297, in get_requirements
return self.unpack_source_dists(arguments, use_wheels=use_wheels)
File "/home/fredlins/.local/lib/python3.8/site-packages/pip_accel/init.py", line 393, in unpack_source_dists
requirements = self.get_pip_requirement_set(arguments, use_remote_index=False, use_wheels=use_wheels)
File "/home/fredlins/.local/lib/python3.8/site-packages/pip_accel/init.py", line 497, in get_pip_requirement_set
requirement_set = command.run(opts, args)
File "/home/fredlins/.local/lib/python3.8/site-packages/pip/commands/install.py", line 245, in run
with self._build_session(options) as session:
File "/home/fredlins/.local/lib/python3.8/site-packages/pip/basecommand.py", line 65, in _build_session
session = PipSession(
File "/home/fredlins/.local/lib/python3.8/site-packages/pip/download.py", line 316, in init
self.headers["User-Agent"] = user_agent()
File "/home/fredlins/.local/lib/python3.8/site-packages/pip/download.py", line 92, in user_agent
zip(["name", "version", "id"], platform.linux_distribution()),
AttributeError: module 'platform' has no attribute 'linux_distribution'

I dont know why you call this method linux_distribution, because not exists.

@deknos
Copy link

deknos commented Dec 3, 2021

I also installed this and it broke my pip installation. Even a pip3 listproduces:

Traceback (most recent call last):
  File "/usr/bin/pip3", line 33, in <module>
    sys.exit(load_entry_point('pip==20.3.4', 'console_scripts', 'pip3')())
  File "/usr/local/lib/python3.9/dist-packages/pip/__init__.py", line 217, in main
    return command.main(cmd_args)
  File "/usr/local/lib/python3.9/dist-packages/pip/basecommand.py", line 244, in main
    with self._build_session(
  File "/usr/local/lib/python3.9/dist-packages/pip/basecommand.py", line 65, in _build_session
    session = PipSession(
  File "/usr/local/lib/python3.9/dist-packages/pip/download.py", line 316, in __init__
    self.headers["User-Agent"] = user_agent()
  File "/usr/local/lib/python3.9/dist-packages/pip/download.py", line 92, in user_agent
    zip(["name", "version", "id"], platform.linux_distribution()),
AttributeError: module 'platform' has no attribute 'linux_distribution'

@deknos
Copy link

deknos commented Dec 3, 2021

ah, okay, it is a python3.8+ compatibility problem?

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