| Summary: | python2 flake8 does not run (DistributionNotFound) | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Rémi Verschelde <rverschelde> |
| Component: | Release (media or process) | Assignee: | Dimitrios Glentadakis <dglent> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | major | ||
| Priority: | Normal | CC: | cae, geiger.david68210, pkg-bugs, sysadmin-bugs |
| Version: | Cauldron | Keywords: | Junior_job |
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | python-flake8-2.5.4-2.mga6 | CVE: | |
| Status comment: | |||
| Attachments: | Enki settings - detection of flake8 | ||
The issue seems to be that /usr/bin/flake8 wants the python3 module instead of the python2 one. It would also be worth upgrading to 3.0.4. A solution to the above issue would be to rename the python2 /usr/bin/flake8 before installing the python3 flavour, or reciprocally. Or decide to package only the latter.
Rémi Verschelde
2016-10-06 09:00:32 CEST
Summary:
flake8 does not run (DistributionNotFound) =>
python2 flake8 does not run (DistributionNotFound)
Rémi Verschelde
2016-10-06 09:01:20 CEST
Keywords:
(none) =>
Junior_job We build flake8 for both python3 and python2.7 If you have installed flake8 on a particular version of Python (or on several versions), it may be best to run python<version> -m flake8. for 2.7 use $ python2.7 -m flake8 for 3 use $ python3 -m flake8 CC:
(none) =>
cae Should be fixed in next python-flake8 update renaming flake8 binary to python3-flake8 in the python3 subpackage. CC:
(none) =>
geiger.david68210 Created attachment 8503 [details]
Enki settings - detection of flake8
Thanks David, i have no Cauldron installation actually, could you please test that enki finds flake8 as in the screenshot? Hmmm! did not think about it :) So I have let the python3-flake8 package use the default name "flake8" in /usr/bin/ as it is the only one who needs really this binary and rename the python2 binary to "python2-flake8". Yay for python3 having the priority in $PATH :D Fixed! Status:
NEW =>
RESOLVED |
Installed `python-flake8` on current Cauldron: (media « Core Release ») python-flake8 2.5.4 2.mga6 noarch python-pep8 1.7.0 1.mga6 noarch python-pyflakes 1.0.0 1.mga6 noarch When running: $ flake8 Traceback (most recent call last): File "/bin/flake8", line 5, in <module> from pkg_resources import load_entry_point File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3140, in <module> @_call_aside File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3126, in _call_aside f(*args, **kwargs) File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 3153, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 640, in _build_master ws.require(__requires__) File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 941, in require needed = self.resolve(parse_requirements(requirements)) File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 828, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'flake8==2.5.4' distribution was not found and is required by the application