summaryrefslogtreecommitdiff
path: root/tools/upip.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/upip.py')
-rw-r--r--tools/upip.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/tools/upip.py b/tools/upip.py
index a6d4c93ae..9fb872642 100644
--- a/tools/upip.py
+++ b/tools/upip.py
@@ -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(
"""\