Last answered:

07 Oct 2020

Posted on:

07 Oct 2020

0

Installing VSCode in Anaconda Navigator on MAC Catalina

Hello, I need some help.  In the Python Bootcamp Capstone project, we are instructed to set up a new Anaconda Navigator environment and install VSCode.  I have set up the new env and started Anaconda Navigator 1.9.12 but, VSCode does not show up as a tile in the navigator.   I have tried the suggestion to install it using pip (found by searching this Q&A section) and, that was "successful" but VSCode  still does not appear in the navigator.   Giles' video instructions involve starting VSCode from Anaconda navigator so, following his instructions is now not possible. BTW : One thing I didn't do was start the Conda prompt as administrator because, its not clear how to do that on a Mac.  Is that what I have done wrong? Below I have copied the result of using pip to do the install.  I did this in a Conda window started from the navigator with the capstone environment.  It looks like it installed but, how do I start the Visual Studio app?
pip install vscode-dl

Collecting vscode-dl   Downloading vscode_dl-1.0.2-py3-none-any.whl (22 kB) Collecting requests-cache   Downloading requests_cache-0.5.2-py2.py3-none-any.whl (22 kB) Requirement already satisfied: python-dateutil in ./opt/anaconda3/envs/capstone/lib/python3.8/site-packages (from vscode-dl) (2.8.1) Requirement already satisfied: PyYAML in ./opt/anaconda3/envs/capstone/lib/python3.8/site-packages (from vscode-dl) (5.3.1) Requirement already satisfied: requests in ./opt/anaconda3/envs/capstone/lib/python3.8/site-packages (from vscode-dl) (2.24.0) Requirement already satisfied: six>=1.5 in ./opt/anaconda3/envs/capstone/lib/python3.8/site-packages (from python-dateutil->vscode-dl) (1.15.0) Requirement already satisfied: certifi>=2017.4.17 in ./opt/anaconda3/envs/capstone/lib/python3.8/site-packages (from requests->vscode-dl) (2020.6.20) Requirement already satisfied: idna<3,>=2.5 in ./opt/anaconda3/envs/capstone/lib/python3.8/site-packages (from requests->vscode-dl) (2.10) Requirement already satisfied: chardet<4,>=3.0.2 in ./opt/anaconda3/envs/capstone/lib/python3.8/site-packages (from requests->vscode-dl) (3.0.4) Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in ./opt/anaconda3/envs/capstone/lib/python3.8/site-packages (from requests->vscode-dl) (1.25.10) Installing collected packages: requests-cache, vscode-dl Successfully installed requests-cache-0.5.2 vscode-dl-1.0.2
2 answers ( 0 marked as helpful)
Posted on:

07 Oct 2020

0
Ok so, as soon as I posted this, I found an answer that worked online. Go to this page and follow the install instructions https://code.visualstudio.com/docs/setup/mac Then stop and re-start Anaconda navigator and VSCode will now be visible as a tile.  No need to install it, you just need to launch the app from the navigator and all will be good. I hope that helps someone else..
Posted on:

07 Oct 2020

0
Further update.  It looks like current VSCode 3.4.2 isn't compatible with the latest version of Python python=3.8. So, my solution was to create a new environment using python 3.6 like this: conda create -n capstone36 python=3.6 anaconda conda activate capstone36   In Anaconda navigator, use this environment to start the Visual Studio app.  (in my case I also had to select the environment from the list at the bottom left of the app) Finally, I tried Giles' code  import numpy as np import cv2 and got it to run without errors.  

Submit an answer