Python Forum
Python and PIP on a windows nano server - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Python and PIP on a windows nano server (/thread-16941.html)



Python and PIP on a windows nano server - philpug - Mar-21-2019

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?


RE: Python and PIP on a windows nano server - nilamo - Mar-21-2019

https://devblogs.microsoft.com/python/python-and-django-on-nano-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"?