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

Pylance can find neither gym nor tensorflow #809

Closed
zal-jlange opened this issue Jan 6, 2021 · 4 comments
Closed

Pylance can find neither gym nor tensorflow #809

zal-jlange opened this issue Jan 6, 2021 · 4 comments
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@zal-jlange
Copy link

Environment data

  • Language Server version: 2020.12.2
  • OS and version: Ubuntu 20.04 (Remote access via Windows 10 - Build 19041.423)
  • Python version (& distribution if applicable, e.g. Anaconda): 3.8.5 native/system

Expected behaviour

Importing gym and tensorflow should enable the Pylance autocompletion.

Actual behaviour

Pylance can't seem to find gym or tensorflow, even though both are installed.

image

Logs

[Info  - 9:32:28 AM] Pylance language server 2020.12.2 (pyright 6feebac9) starting
[Info  - 9:32:28 AM] Server root directory: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist
[Info  - 9:32:28 AM] No configuration file found.
[Info  - 9:32:28 AM] Setting pythonPath for service "examples": "/usr/bin/python3"
Search paths found for configured python interpreter:
  /opt/ros/noetic/lib/python3/dist-packages
  /usr/lib/python3.8
  /usr/lib/python3.8/lib-dynload
  /home/jlange/.local/lib/python3.8/site-packages
  /usr/local/lib/python3.8/dist-packages
  /usr/lib/python3/dist-packages
[Error - 9:32:28 AM] stubPath /home/jlange/projects/examples/typings is not a valid directory.
[Info  - 9:32:28 AM] Assuming Python version 3.8
[Info  - 9:32:28 AM] Assuming Python platform Linux
[Info  - 9:32:28 AM] Searching for source files
[Info  - 9:32:28 AM] Found 2 source files
[Info  - 9:32:28 AM] Background analysis(1) root directory: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist
[Info  - 9:32:28 AM] Background analysis(1) started
Background analysis message: setConfigOptions
Background analysis message: setTrackedFiles
Background analysis message: markAllFilesDirty
Background analysis message: setFileOpened
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (15ms)
[BG(1)] parsing: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist/typeshed-fallback/stdlib/3/builtins.pyi [fs read 2ms] (109ms)
[BG(1)] binding: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist/typeshed-fallback/stdlib/3/builtins.pyi (40ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: getSemanticTokens
Background analysis message: analyze
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py ...
[BG(1)]   checking: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py (1ms)
Background analysis message: resumeAnalysis
IntelliCode model /home/jlange/.vscode-server/extensions/visualstudioexptteam.vscodeintellicode-1.2.10/cache/E61945A9A512ED5E1A3EE3F1A2365B88F8FE_E4E9EADA96734F01970E616FAB2FAC19
Loading ONNX runtime...
Loaded ONNX runtime. Creating IntelliCode session...
2021-01-06 09:32:29.137589276 [I:onnxruntime:, inference_session.cc:174 ConstructorCommon] Creating and using per session threadpools since use_per_session_threads_ is true
2021-01-06 09:32:29.143017110 [I:onnxruntime:, inference_session.cc:840 Initialize] Initializing session.
2021-01-06 09:32:29.143034040 [I:onnxruntime:, inference_session.cc:865 Initialize] Adding default CPU execution provider.
2021-01-06 09:32:29.144229391 [I:onnxruntime:, reshape_fusion.cc:37 ApplyImpl] Total fused reshape node count: 0
2021-01-06 09:32:29.144656781 [I:onnxruntime:, reshape_fusion.cc:37 ApplyImpl] Total fused reshape node count: 0
2021-01-06 09:32:29.147242853 [V:onnxruntime:, inference_session.cc:679 TransformGraph] Node placements
2021-01-06 09:32:29.147251533 [V:onnxruntime:, inference_session.cc:681 TransformGraph] All nodes have been placed on [CPUExecutionProvider].
2021-01-06 09:32:29.147278223 [V:onnxruntime:, session_state.cc:71 CreateGraphInfo] SaveMLValueNameIndexMapping
2021-01-06 09:32:29.147317873 [V:onnxruntime:, session_state.cc:116 CreateGraphInfo] Done saving OrtValue mappings.
2021-01-06 09:32:29.148091824 [I:onnxruntime:, finalize_session_state.cc:173 SaveInitializedTensors] Saving initialized tensors.
2021-01-06 09:32:29.158528191 [I:onnxruntime:, finalize_session_state.cc:225 SaveInitializedTensors] Done saving initialized tensors
2021-01-06 09:32:29.161306373 [I:onnxruntime:, inference_session.cc:954 Initialize] Session successfully initialized.
Created IntelliCode session.
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: analyze
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py ...
[BG(1)]   parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)]   checking: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py (2ms)
Background analysis message: resumeAnalysis
Background analysis message: getSemanticTokens
[FG] parsing: /home/jlange/projects/examples/gym/import_example.py (18ms)
[FG] parsing: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist/typeshed-fallback/stdlib/3/builtins.pyi [fs read 2ms] (112ms)
[FG] binding: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist/typeshed-fallback/stdlib/3/builtins.pyi (37ms)
[FG] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:1 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:1 [found 96 items] (6ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 1 ms, Memory increase: 85 KB.
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)] parsing: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist/typeshed-fallback/stdlib/2and3/_typeshed/__init__.pyi [fs read 3ms] (20ms)
[BG(1)] binding: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist/typeshed-fallback/stdlib/2and3/_typeshed/__init__.pyi (2ms)
[BG(1)] parsing: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist/typeshed-fallback/third_party/2and3/typing_extensions.pyi [fs read 0ms] (6ms)
[BG(1)] binding: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist/typeshed-fallback/third_party/2and3/typing_extensions.pyi (1ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:2 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (1ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:2 [found 13 items] (3ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 3 ms, Memory increase: -1185 KB.
[BG(1)] parsing: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist/typeshed-fallback/stdlib/3/typing.pyi [fs read 0ms] (43ms)
[BG(1)] binding: /home/jlange/.vscode-server/extensions/ms-python.vscode-pylance-2020.12.2/dist/typeshed-fallback/stdlib/3/typing.pyi (12ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:3 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:3 [found 6 items] (4ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 1 ms, Memory increase: 21 KB.
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (1ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: analyze
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py ...
[BG(1)]   parsing: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)]   checking: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py (1ms)
Background analysis message: resumeAnalysis
Background analysis message: getSemanticTokens
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:8 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (2ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (1ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:8 [found 74 items] (7ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 0 ms, Memory increase: 23 KB.
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:9 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (2ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:9 [found 2 items] (6ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 0 ms, Memory increase: 14 KB.
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (4ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: analyze
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py ...
[BG(1)]   checking: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: resumeAnalysis
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:10 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:2:10 [found 1 items] (4ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 0 ms, Memory increase: 15 KB.
Background analysis message: analyze
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py ...
[BG(1)]   parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)]   checking: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py (2ms)
Background analysis message: resumeAnalysis
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: getSemanticTokens
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: analyze
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py ...
[BG(1)]   checking: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py (1ms)
Background analysis message: resumeAnalysis
[FG] parsing: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: analyze
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py ...
[BG(1)]   parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)]   checking: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py (1ms)
Background analysis message: resumeAnalysis
Background analysis message: getSemanticTokens
[FG] parsing: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:1 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:1 [found 96 items] (6ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 1 ms, Memory increase: 16 KB.
Background analysis message: analyze
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py ...
[BG(1)]   parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)]   checking: /home/jlange/projects/examples/gym/import_example.py (7ms)
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py (8ms)
Background analysis message: resumeAnalysis
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: getSemanticTokens
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:2 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:2 [found 13 items] (3ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 0 ms, Memory increase: 16 KB.
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
[FG] parsing: /home/jlange/projects/examples/gym/import_example.py (3ms)
[FG] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: analyze
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py ...
[BG(1)]   parsing: /home/jlange/projects/examples/gym/import_example.py (6ms)
[BG(1)]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)]   checking: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py (7ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: resumeAnalysis
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py ...
[BG(1)]   parsing: /home/jlange/projects/examples/gym/import_example.py (5ms)
[BG(1)]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)]   checking: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py (6ms)
Background analysis message: resumeAnalysis
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:10 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (6ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:10 [found 19 items] (12ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 0 ms, Memory increase: 17 KB.
Background analysis message: getSemanticTokens
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:11 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (5ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (1ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:11 [found 9 items] (11ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 1 ms, Memory increase: 17 KB.
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:12 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (5ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:12 [found 8 items] (12ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 0 ms, Memory increase: 16 KB.
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (5ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (5ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (1ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (7ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
[FG] parsing: /home/jlange/projects/examples/gym/import_example.py (2ms)
[FG] binding: /home/jlange/projects/examples/gym/import_example.py (1ms)
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:19 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:19 [found 74 items] (4ms)
IntelliCode: current invocation did not produce any meaningful tokens.
Time taken to get recommendations: 1 ms, Memory increase: 18 KB.
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:20 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:20 [found null items] (1ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:22 ...
[FG]   parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[FG]   binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
[FG] completion at /home/jlange/projects/examples/gym/import_example.py:3:22 [found null items] (2ms)
Background analysis message: setFileOpened
Background analysis message: markFilesDirty
Background analysis message: getSemanticTokens
[BG(1)] parsing: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: analyze
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py ...
[BG(1)]   checking: /home/jlange/projects/examples/gym/import_example.py (0ms)
[BG(1)] analyzing: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: resumeAnalysis
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange
[FG] parsing: /home/jlange/projects/examples/gym/import_example.py (1ms)
[FG] binding: /home/jlange/projects/examples/gym/import_example.py (0ms)
Background analysis message: getDiagnosticsForRange
Background analysis message: getDiagnosticsForRange

Code Snippet / Additional information

#!/usr/bin/env python3

import gym
import tensorflow as tf

Search paths from log:

Search paths found for configured python interpreter:
  /opt/ros/noetic/lib/python3/dist-packages
  /usr/lib/python3.8
  /usr/lib/python3.8/lib-dynload
  /home/jlange/.local/lib/python3.8/site-packages
  /usr/local/lib/python3.8/dist-packages
  /usr/lib/python3/dist-packages

Proof of installation

pip

pip3 freeze | grep gym
gym==0.18.0
pip3 freeze | grep tensorflow
tensorflow==2.4.0
tensorflow-estimator==2.4.0

Local

ls /home/jlange/.local/lib/python3.8/site-packages | grep gym
gym
gym-0.18.0.dist-info
ls /home/jlange/.local/lib/python3.8/site-packages | grep tensorflow
tensorflow
tensorflow-2.4.0.dist-info
tensorflow_estimator
tensorflow_estimator-2.4.0.dist-info

Global

ls /usr/local/lib/python3.8/dist-packages | grep gym
gym
gym-0.18.0.dist-info
@github-actions github-actions bot added the triage label Jan 6, 2021
@judej judej added the needs investigation Could be an issue - needs investigation label Jan 7, 2021
@github-actions github-actions bot removed the triage label Jan 7, 2021
@zal-jlange
Copy link
Author

I just realized, while Pylance won't find gym, it happily finds inner packages:

image

image

image

This might be related to #801.

@jakebailey jakebailey added fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed needs investigation Could be an issue - needs investigation labels Feb 25, 2021
@jakebailey
Copy link
Member

The above cases will work in the next version; jumping to each of them work.

@jakebailey
Copy link
Member

This issue has been fixed in version 2021.2.4, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202124-24-february-2021

@juhannc
Copy link

juhannc commented Feb 25, 2021

Awesome, thank you! 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

4 participants