![]() ![]() ![]() This output shows that the virtual environment was created in the /home/ubuntu/.local/share/virtualenvs/pycloud-olh7AE3i/ folder. You will receive messages confirming that a new virtual environment was created: ![]() This creates the virtual environment, then installs the numpy package. Within VS Code, open a New Terminal window, then enter the following command: pipenv install numpy Usually when you create a new virtual environment and project, you know which package you need to install first. We won’t really be using numpy for this example – it’s just some package we can install. We will install a very popular numerical package for Python called numpy. ![]() Using pipenv, you create a virtual environment simply by installing the first Python package you need. Use whatever directory name you would like: mkdir pycloud Make sure you are in your home directory: cd ~Ĭreate a new directory to hold all the files in the new project, then go to it and start up VS Code. Open a terminal window and run the following sequence of commands: Connect to your virtual machine using Remote Desktop Protocol and get into Ubuntu Desktop. Since we are using pipenv as our chosen tool for Python package and virtual let’s use it to create a new project and virtual environment under VS Code. Note that this process can be used to set up any development computer for Python under VS code, whether the development machine is in the cloud or not, provided that you have installed all the software identified in project steps 1 – 3.īack to Project Create a New Project and Virtual Environment Using pipenv In this step, you create a new Python project and virtual environment under Visual Studio code and get a Hello World program running in the VS Code Debugger. This is step 4 of 6 of Hands-On Project 2 for Azure and Amazon Web Services. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |