|
|
@ -262,6 +262,8 @@ def get_install_path(): |
|
|
|
if install_path is None: |
|
|
|
# sys.path[0] is current module's path |
|
|
|
install_path = sys.path[1] |
|
|
|
if install_path == ".frozen": |
|
|
|
install_path = sys.path[2] |
|
|
|
install_path = expandhome(install_path) |
|
|
|
return install_path |
|
|
|
|
|
|
@ -281,11 +283,11 @@ upip - Simple PyPI package manager for MicroPython |
|
|
|
Usage: micropython -m upip install [-p <path>] <package>... | -r <requirements.txt> |
|
|
|
import upip; upip.install(package_or_list, [<path>]) |
|
|
|
|
|
|
|
If <path> is not given, packages will be installed into sys.path[1] |
|
|
|
(can be set from MICROPYPATH environment variable, if current system |
|
|
|
supports that).""" |
|
|
|
If <path> isn't given, packages will be installed to sys.path[1], or |
|
|
|
sys.path[2] if the former is .frozen (path can be set from MICROPYPATH |
|
|
|
environment variable if supported).""" |
|
|
|
) |
|
|
|
print("Current value of sys.path[1]:", sys.path[1]) |
|
|
|
print("Default install path:", get_install_path()) |
|
|
|
print( |
|
|
|
"""\ |
|
|
|
|
|
|
|