question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Sorting of imports seems to fail when using Python 2.7

See original GitHub issue
  • Create a file with some python code
  • Right click and select Sort Imports
  • Error displayed is as follows:
Starting the classic analysis engine.
Error: Traceback (most recent call last):
  File "/Users/donjayamanne/.vscode/extensions/ms-python.python-2018.6.0/pythonFiles/sortImports.py", line 1, in <module>
    import isort.main
  File "/Users/donjayamanne/.vscode/extensions/ms-python.python-2018.6.0/pythonFiles/isort/main.py", line 28, in <module>
    from concurrent.futures import ProcessPoolExecutor
ImportError: No module named concurrent.futures

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:10
  • Comments:10 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
MrAlexBaileycommented, Jun 3, 2019

@MrAlexBailey

Easily fixed by installing it manually

How or what did you manually install?

backports.functools_lru_cache library via pip

2reactions
brettcannoncommented, Jun 20, 2018

This is due to futures not being installed by us.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code's "Sort Imports" fails with exception - Stack Overflow
I've updated the full stack trace. Steps to reproduce: 1. Open a python script with multiple import lines 2. Open command palette 3....
Read more >
Common migration problems — Supporting Python 3
Sometimes you'll encounter a situation where 2to3 seems to have missed changing an import. This is usually because you can import a function...
Read more >
What's New In Python 3.8 — Python 3.11.1 documentation
To support both 3.8 and older, try python3-config --libs --embed first and fallback to python3-config --libs (without --embed ) if the previous command...
Read more >
isort
isort is a Python utility / library to sort imports alphabetically, and ... It requires Python 3.7+ to run but supports formatting Python...
Read more >
sort-imports - ESLint - Pluggable JavaScript Linter
2. When declaring multiple imports, a sorted list of import declarations make it ... /*eslint sort-imports: "error"*/ import b from 'foo.js'; import a...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found