If you have Windows 10, VSCode will use PowerShell as the default program when you try to run a Python program, but unfortunately this does not work with Anaconda. Once you selected the cse163 environment, you should no longer get a warning about not being able to import geopandas if there was one earlier. Click on it and a prompt should appear for you to select, and you should find the one relating to the cse163 Anaconda environment (should be something like anaconda/envs/cse163/bin/python, but may be different based on your operating system) which is circled in red in the diagram below. In the blue bar at the bottom in the above image, you should see which version of Python VSCode is currently using. The first import shows up as red since VSCode is most likely not using the cse163 Anaconda environment we just set up. It is entirely expected that you might see some errors when you first open the file! If you click the "Open Folder" button on the welcome page of the VSCode application and select the test directory, you should then see the following editor if you click on the main.py on the left. You should click the Python link circled in red to install the VSCode Python plugins Step 4 - Set Up VSCode for Python Developmentĭownload test.zip to whichever directory you plan to use to store homework assignments and unzip it so you have a test directory in your working directory. Once installed, you should open the Visual Studio Code application and should see a screen like below. Go to Visual Studio Code's website and install the IDE for whichever operating system you own. Clicking on the environment should show you something that looks like a list of Python packages: ![]() Once you have done this and created the environment, it will install all of the necessary packages.Īfter all the packages have been installed, you should see an environment called cse163 and if you select it, will have many packages installed. In the prompt after selecting the environment specification, you should name the environment cse163. Click on the folder icon, navigate to and select the environment.yaml file you downloaded earlier. Navigate to the Environments section on the left, and click the Import button at the bottom. The location of this file does not matter as long as you remember where you saved it. This file specifies all of the requisite Python packages and their versions. Step 2 - Create Environment and Install Python Packagesĭownload the environment.yaml somewhere on your computer. Once installed, you should open the Anaconda Navigator application and you will see a screen like: Go to Anaconda's website and install Python 3.7 for whichever operating system you own. You may then skip this step after you have successfully installed Python 3.7. You should open up terminal/command prompt and run the commands:Ĭonda update conda conda install python=3.7 Step 1 - Install Anaconda 3 If you already have Anaconda 3 installed with a version of Python before 3.7:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |