How to install upip into my PC ?

Discussion about programs, libraries and tools that work with MicroPython. Mostly these are provided by a third party.
Target audience: All users and developers of MicroPython.
Post Reply
mun
Posts: 3
Joined: Wed Oct 30, 2019 4:52 am

How to install upip into my PC ?

Post by mun » Sun Nov 03, 2019 11:19 am

Hello guys,

I have some questions about pip and upip.

1) What is the difference between the pip and the upip?
2) How to install upip into my PC? like from this link which is from PYPL. https://pypi.org/project/micropython-upip/
I got this after I wrote or copied"pip install micropython-upip" from pypi link.

Code: Select all

Collecting micropython-upip
  Using cached https://files.pythonhosted.org/packages/29/81/52df27cb7d240190c1d3ddab0c081bd3296bedcce155eed9e7016c4d92f0/micropython-upip-1.2.6.tar.gz
    ERROR: Command errored out with exit status 1:
     command: 'c:\program files (x86)\python38-32\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\munyi\\AppData\\Local\\Temp\\pip-install-bvtdp9l6\\micropython-upip\\setup.py'"'"'; __file__='"'"'C:\\Users\\munyi\\AppData\\Local\\Temp\\pip-install-bvtdp9l6\\micropython-upip\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\munyi\AppData\Local\Temp\pip-install-bvtdp9l6\micropython-upip\pip-egg-info'
         cwd: C:\Users\munyi\AppData\Local\Temp\pip-install-bvtdp9l6\micropython-upip\
    Complete output (5 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:\program files (x86)\python38-32\lib\tokenize.py", line 392, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\munyi\\AppData\\Local\\Temp\\pip-install-bvtdp9l6\\micropython-upip\\setup.py'
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
3)
After downloading the package of micropython-upip meant this will not happen? (below)
Command Prompt does not recognize micropython.

Code: Select all

'micropython' is not recognized as an internal or external command,
operable program or batch file.
Or got another to solve this?

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: How to install upip into my PC ?

Post by pythoncoder » Sun Nov 03, 2019 11:35 am

The upip library is intended to run on WiFi connected hardware where the network has an internet connection.

For devices lacking a WiFi interface there is an unofficial way to install MicroPython libraries to a PC, from where they may be copied to the target hardware. This is micropip which runs under Python 3.2 or above. It may be found here.
Peter Hinch
Index to my micropython libraries.

mun
Posts: 3
Joined: Wed Oct 30, 2019 4:52 am

Re: How to install upip into my PC ?

Post by mun » Sun Nov 03, 2019 12:51 pm

Hi pythoncoder,
Tq for your relay. I am appreciated for your help.
I download the zip file of micropython samples from the link you posted.
Then I got this:

Code: Select all

ERROR: Could not find a version that satisfies the requirement micropip (from versions: none)
ERROR: No matching distribution found for micropip
I have some questions to ask. What is the type of file that the command prompt will recognize and install them in the python and micropython scripts?

Besides, why my command prompt cannot recognize "micropython" ? I already downloaded the source code of the micropython for the official site of the micropython. http://micropython.org/download
-micropython-1.11.zip
-micropython-1.11.tar.xz

thanks in advance

Post Reply