run Python app without Visual Studio

Thomas Ligon (Office 365) 26 Reputation points
2022-08-19T20:52:41.267+00:00

I have written a Python app on Visual Studio Community 2022 and now I need more power than my desktop PC offers. In order to reduce overhead, I would like to run the app without Visual Studio, and then run it in the cloud (probably Azure) without Visual Studio. That means that I need to understand how to start the app without VS, and how to give it information about the Python environment, the project solution files, etc. Is there documentation on doing that? If not, I probably need to read the basics on python.org and guess how VS has configured things. For example, I found python.exe on C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python39_64 and could probably find the environment as well, try out some environment variables, etc., but I would prefer some documentation.

Visual Studio
Visual Studio
A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.
4,627 questions
0 comments No comments
{count} votes

3 additional answers

Sort by: Most helpful
  1. Sam of Simple Samples 5,516 Reputation points
    2022-08-21T03:25:17.103+00:00

    I tried Python and gave up on the language. In addition to the language, its development and runtime tools are integrated with the language enough that it can be frustrating. I did have difficulties trying to do things without Visual Studio, and when I say without Visual Studio I mean doing things the way most people in python.org would do things.

    Yes you need to learn about Python Environments and many other things. I suggest you learn as much as you can using your local system. You can do that with simple Python programs and learn a lot.

    One possibility is to install Windows Subsystem for Linux (WSL) if you have not. That gives you a totally separate installation. WSL provides a real version of Linux except Windows does not yet support a GUI in WSL. Visual Studio Code might help with that.

    0 comments No comments

  2. Thomas Ligon (Office 365) 26 Reputation points
    2022-08-21T16:13:02.45+00:00

    Thanks to both of you for very good responses.
    My main difficulty with Azure is the sheer size of it. Now that I have started to read the (very good) documentation on Azure Functions I can see that it definitely looks good. I will create this solution as a next step, instead of Azure VM. That means that I need to learn a bit of "pure" Python, but that shouldn't be a problem. It's just one thing I postponed as long as I didn't need it.
    Some background: I developed code for Unix a long time ago, before Linux had been invented, but the last part of my work in computing was in Windows, so I know it better and I like both Windows and Visual Studio (and I have forgotten most of what I knew about Unix). After retiring and starting on some research, I worked with a team that developed a big piece of software for academic use, and it was written in ANSI C, C++ and MATLAB by people who all use Mac OS and Linux. Then they decided to replace MATLAB by Python, so I needed to learn Python (after learning MATLAB). Now, I use Python to work on a project in pure mathematics, and I work alone except for getting advice from a mathematics professor. Here, I use my computer to do symbolic math and numerical calculations. I am very happy with what Python is doing for me.
    Learning Linux is something else I have postponed, and I don't need it for this project. I can submit "pure" Python to Azure Functions, where it will run on Linux, but I can still develop on Windows. While I was working with the team I mentioned, I installed WSL. As far as I could tell, WSL is not very useful until you install Linux on top of it. I installed Ubuntu, which has a GUI, but I never really needed it, so I am not using it now.
    Before retiring, I often met system administrators who had a dual boot so they could test things in either Windows or Linux. For them, dual boot was a good solution, but WSL is much better for developers. It runs on Hyper-V and integrates Linux with Windows. For example, if you install Ubuntu, the Ubuntu system and Windows run simultaneously and have seamless access to the same disk and file system.


  3. Jack Lopez 1 Reputation point
    2022-10-13T05:50:27.317+00:00

    Quickstart - Open a Python code folder - Visual Studio (Windows) In this quickstart, you open and run Python code from a folder without using a Visual Studio project (Visual Studio 2019 only).