0

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.

asked Jan 30, 2025 at 1:53
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. Commented Jan 30, 2025 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. Commented Jan 31, 2025 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 :) Commented Jan 31, 2025 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. Commented Jan 31, 2025 at 19:24

2 Answers 2

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
answered Jan 30, 2025 at 2:06
Sign up to request clarification or add additional context in comments.

3 Comments

Issue is with VS-Code(which I have already installed). '
Clearly, OP does want to use vscode.
Exactly @tdelaney.
0

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.

answered Jan 30, 2025 at 3:52

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.