Install & use Python with any IDE offline - Stack Overflow

admin2025-04-18  4

I teach Python in a small org. where internet is disabled in the lab-systems due to some mis-usage/security issues. So pip installations OR installing any extension for any IDE is not possible.

I have copied (using USB drive) & installed python v3.13, VS-Code.I face problems executing Python scripts using VS-Code.

NOTE: I do not want to use IDLE.

I teach Python in a small org. where internet is disabled in the lab-systems due to some mis-usage/security issues. So pip installations OR installing any extension for any IDE is not possible.

I have copied (using USB drive) & installed python v3.13, VS-Code.I face problems executing Python scripts using VS-Code.

NOTE: I do not want to use IDLE.

Share Improve this question edited Jan 31 at 18:17 Venkata asked Jan 30 at 1:53 VenkataVenkata 3111 gold badge3 silver badges11 bronze badges 4
  • 1 Generally you can put the package .whl files on your usb stick and install pip install /path/to/package.whl or even put a bunch of them in a requirements.txt file. Depending on the operating system, you could copy .deb or .rpm equivalents of your modules and install on the OS. Back in the day, I setup my own pypi server in the lab and manually copied the stuff I wanted from pypi.org. I think that should still work, but I don't remember the details off hand. – tdelaney Commented Jan 30 at 2:20
  • From the context of your question, I don't understand how you can install or use any IDE if you've got no internet access. Whichever IDE you use you are, according to the question, stuck with the Python Standard Library and no other packages. It sounds like the best situation would be to lobby to have these restrictions removed or teach Python on a different network. – David Buck Commented Jan 31 at 7:43
  • Hi @DavidBuck, You understood my situation well. I just wanted to start the things offline with just the default Python default libraries :) – Venkata Commented Jan 31 at 18:21
  • No, there are lots of ways to get packages without the internet. You may be able to create a venv on a regular machine and zip it. Or use docker or azure. Or pip freeze. Or create an exe. And there is a lot of deployment software out there. Salt Stack maybe. This bridge has been built many times. – tdelaney Commented Jan 31 at 19:24
Add a comment  | 

2 Answers 2

Reset to default 0

You don't want to use Idle, and you don't want to use VSCode.

What do you want to use?

For short simple scripts, I use the command prompt as an Integrated Design Environment, and

copy con myprog.py

It happened to me, though at that time VSCode wasn't really a thing yet.

For Python, I used Anaconda. It come packed with so much packages that only for very specific edge cases you would need to bundle extra packages.

Concerning VSCode, you can prepare what you need, and download the list of extensions to install on the target machines from a USB Key. Not ideal, but for starting with Python, not much is needed.

You could also select another IDE, I agree that PyCharm is a good start and many of my colleagues started with this program, our formation session use also this IDE to teach the basics of Python. Or go lighter. A Notepad++ can be enough for starters.

转载请注明原文地址:http://anycun.com/QandA/1744942309a89807.html