2

Am consistently keep getting errors in Visual Studio code about "no name ‘vision’ in module fastai and ‘unable to import fastai.vision’ whereas I can successfully run Fastai from Jupyter notebook. I have created a new FastAI environment and also selected it in the VS code but it still keeps failing to recognize & load fastai.vision.I searched every blog & forum including the Troubleshooting section to no avail.

Here are details from fastai.utils run from Jupyter notebooks

=== Software === 
python       : 3.7.3
fastai       : 1.0.61
fastprogress : 0.2.2
torch        : 1.5.1
torch cuda   : None / is **Not available** 

=== Hardware === 
No GPUs available 

=== Environment === 
platform     : Windows-10-10.0.20161-SP0
conda env    : Unknown
python       : C:\ProgramData\Anaconda3\envs\fastai\python.exe
sys.path     : C:\Users\Zyon
C:\ProgramData\Anaconda3\envs\fastai\python37.zip
C:\ProgramData\Anaconda3\envs\fastai\DLLs
C:\ProgramData\Anaconda3\envs\fastai\lib
C:\ProgramData\Anaconda3\envs\fastai

C:\Users\Zyon\AppData\Roaming\Python\Python37\site-packages
C:\ProgramData\Anaconda3\envs\fastai\lib\site-packages
C:\ProgramData\Anaconda3\envs\fastai\lib\site-packages\win32
C:\ProgramData\Anaconda3\envs\fastai\lib\site-packages\win32\lib
C:\ProgramData\Anaconda3\envs\fastai\lib\site-packages\Pythonwin
C:\ProgramData\Anaconda3\envs\fastai\lib\site-packages\IPython\extensions
C:\Users\Zyon\.ipython
no supported gpus found on this system

Why am I so desperate for Visual studio code? cause I want to use my exported models and builds app or web-apps and VS Code is a really good IDE. I do have Spyder but I am unable to figure out how to select the correct interpreter.

Has anyone had any success in VS code & fastai? Are they not compatible. note: I have another machine with GPU but am facing the same error there too.

  • Plese read the description of the [tag:ml] tag. – molbdnilo Jul 03 '20 at 05:58
  • Does this answer your question? [Visual Studio Code, Conda, and Python Environments (I cannot get it working)](https://stackoverflow.com/questions/55786990/visual-studio-code-conda-and-python-environments-i-cannot-get-it-working) – Brett Cannon Jul 03 '20 at 16:56
  • @BrettCannon Yes, I tried a few options mention in the thread but that didnt work either. Following is something I found a bit weird. When run python from my fastai env then it open up a 32bit python but I’ve installed a 64bit python from Anaconda 64bit. I get no errors when I try to import fastai modules from Python executed from the env. but I get the same error when try to execute the .py file from the python terminal. – LearnfromML Jul 04 '20 at 07:33
  • @BrettCannon Thank you Brett, your suggestion to review the other thread worked. I added the all the path to the PATH environment variable, restarted the machine and it worked. – LearnfromML Jul 05 '20 at 22:51

0 Answers0