Hi !
Let me start with IANAPU [I am not a Python user], and that’s maybe why, when I need to work and understand what is in my current environment it took me a lot of time to get and deploy the correct tools and the right packages to work with. I’m not a fan of console environments, and if we add this to the 90% of the Python work, that maybe the main problem.
Visual Studio Code is amazing environment to work with Python. So far, is good enough for me and my machine learning devs. I’ll became a brand-new Mac user in the next couple of days, so I hope that everything I’ve learned is the same on Mac.
I was trying some of the new features in Visual Studio 2019 Preview 2, and the options to manage Python environments blown my mind.
Let’s start with a single Python Application in the solution explorer. With 2 clicks I know what I have in my environment: current python version, packages and more.
With 2 clicks I can add a new environment, where I can choose the Python version, a base Anaconda environment, and tons of options more.
If we decided to create an Anaconda working environment, we can load our working packages from a file, or from a cool drop-down list.
Adding and upgrading packages is done with the usual Visual Studio integrated experience
Of course, we have the option to review the Console logs, to understand the background processes
Virtual environment is being created at '...\Python\PythonApplication1\envBlog01' Virtual environment was successfully created at '...\Python\PythonApplication1\envBlog01' ----- Creating 'envBlogConda01' ----- Solving environment: ...working... done ## Package Plan ## environment location: d:\ProgramData\Anaconda3\envs\envBlogConda01 ==> WARNING: A newer version of conda exists. <== Preparing transaction: ...working... done current version: 4.5.4 latest version: 4.6.1 Please update conda by running $ conda update -n base conda Verifying transaction: ...working... done Executing transaction: ...working... done # # To activate this environment, use: # > activate envBlogConda01 # # To deactivate an active environment, use: # > deactivate # # * for power-users using bash, you must source # ----- Successfully created 'envBlogConda01' ----- ---- Installing 'numpy' ----- Collecting numpy Downloading https://files.pythonhosted.org/packages/31/7e/8905636f7e4f9b9d7078aa0e701500634f832f145855a11beb098d3b0fb1/numpy-1.16.0-cp36-cp36m-win_amd64.whl (11.9MB) Installing collected packages: numpy Successfully installed numpy-1.16.0 You are using pip version 10.0.1, however version 19.0.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. ----- Successfully installed 'numpy' ----- ---- Installing 'pip' ----- Collecting pip==19.0.1 Downloading https://files.pythonhosted.org/packages/46/dc/7fd5df840efb3e56c8b4f768793a237ec4ee59891959d6a215d63f727023/pip-19.0.1-py2.py3-none-any.whl (1.4MB) Installing collected packages: pip Found existing installation: pip 10.0.1 Uninstalling pip-10.0.1: Successfully uninstalled pip-10.0.1 Successfully installed pip-19.0.1 ----- Successfully installed 'pip' -----
Happy Coding!
Greetings @ Toronto
El Bruno
References
Do you know whether python integration is the same in in VS2019 for windows and VS2019 for mac?
LikeLike
Hi Feez
We don’t have python integration in VS for Mac. I use VSCode in Mac for Python.
Regards
LikeLike