Skip to content
This repository has been archived by the owner on Dec 23, 2021. It is now read-only.

autocompletion in virtual env #373

Open
mess-maker opened this issue May 9, 2020 · 4 comments
Open

autocompletion in virtual env #373

mess-maker opened this issue May 9, 2020 · 4 comments
Labels
bug Something isn't working

Comments

@mess-maker
Copy link

Hi,

not sure if it is the place to ask this kind of question, sorry I'm new to github

I've created a project directory
created a python venv inside the directory
activated the venv
created a new .py file by the command "device simulator express : new file"
(so via vs code inside the venv)
answered yes to the pop up to install the required files

all seems to work, the simulator work the py script runs, but the autocompletion don t work

did I do something wrong ?
maybe i don t need to create a venv by myself ?

thanks for any help and sorry if rise an issue for nothing

@andreamah
Copy link
Contributor

Hi @mess-maker ! You don't need to create a venv by yourself, since the extension should make one for you if you don't have one.

If you decide that you want to use your own custom venv, please do the following:

  1. Re-select the Python interpreter to point to your venv's interpreter
  2. Restart VS Code or select "install extension dependencies" from the command palette.

Either way, there is no need to activate the venv 😊.

@lukequeenan
Copy link

lukequeenan commented May 24, 2020

I'm seeing a similar problem where from microbit import * is unrecognized. However I can find the modules under from micropython.microbit import *.

The latter import works for Intellisense and the simulator but I need to change it back to from microbit import* when deploying to the actual microbit.

@erongd
Copy link

erongd commented Jul 28, 2020

I'm seeing a similar problem where from microbit import * is unrecognized. However I can find the modules under from micropython.microbit import *.

The latter import works for Intellisense and the simulator but I need to change it back to from microbit import* when deploying to the actual microbit.

Have exactly the same issue on Mac with latest VSCode and Extensions. The same seems to work on raspberry pi though.

@gramster
Copy link
Member

The extension doesn't use the "real" libraries but has its own "fake" versions that work with the simulator. There's probably a structural difference you are encountering, that we need to fix.

@gramster gramster added the bug Something isn't working label Aug 26, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants