Python Forum
Python and PIP on a windows nano server
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python and PIP on a windows nano server
#1
Hi All,

I've been trying to create a docker container of a windows nano server to run a django application.

I'm having trouble with the build and I'm looking for some advice.

Everything appears to install fine from the build file (Below)

# Indicates that the nanoserver image will be used as the base image
FROM microsoft/nanoserver

# Copies the python 37 files to the server
COPY ./Python c:/Python

# Uses PowerShell to set the env path and install get-pip.py
RUN powershell.exe -Command \
  $Env:Path += “;C:\python;C:\python\Python37;C:\python\Python37\Scripts;C:\python\Scripts” ; \
  SETX PATH $Env:Path /M ; \
  python C:\python\Scripts\get-pip.py
but then when I try to use pip I get the this error

nanoerror



Does anyone have any idea why or if it's possible to run on nano server?
Reply
#2
https://devblogs.microsoft.com/python/py...no-server/
That article seems to indicate that pip can work fine on a nano server.

Your error is interesting, because the various python files in the traceback are on different drives (C and D).

Does python work on it's own? What happens if you run python -V? What about python -m "ensurepip"?
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Triggering a ps1 script in remote windows server via http python request jasveerjassi 1 363 Jan-26-2024, 07:02 PM
Last Post: deanhystad
  How to take the tar backup files form remote server to local server sivareddy 0 1,894 Jul-14-2021, 01:32 PM
Last Post: sivareddy
  Python IDE doesn't see opencv-python package on my Jetson Nano sadhaonnisa 1 3,329 Oct-11-2020, 01:04 AM
Last Post: Larz60+
  running Python on Windows OS / IIS server ajetrumpet 4 3,335 Feb-02-2020, 05:55 PM
Last Post: ndc85430
  Windows server 2008 SP2 - Python cx_Oracle connection DLL error tpanagoda 2 5,043 Mar-05-2018, 04:35 AM
Last Post: tpanagoda

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020