8000 pip.main is gone in new pips · klaymond/python-tutorial@d8bdbee · GitHub
[go: up one dir, main page]

Skip to content

Commit d8bdbee

Browse files
committed
pip.main is gone in new pips
1 parent 60c2d78 commit d8bdbee

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

make-html.py

Lines changed: 8 additions & 3 deletions
< 72B0 td data-grid-cell-id="diff-9d3e0014702cf10e84a86ded5de3b784b1723db82cd0c68e48bf0a04c732d2d8-42-47-1" data-selected="false" role="gridcell" style="background-color:var(--bgColor-default);text-align:center" tabindex="-1" valign="top" class="focusable-grid-cell diff-line-number position-relative diff-line-number-neutral left-side">47
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,16 @@
3939
try:
4040
import mistune
4141
except ImportError:
42+
import platform
43+
if platform.system() == 'Windows':
44+
python = 'py'
45+
else:
46+
python = 'python3'
42
print("mistune isn't installed.", file=sys.stderr)
43-
print("You can install it like this:")
48+
print("You can install it by running this command on a terminal or ")
49+
print("command prompt:")
4450
print()
45-
print(">>> import pip")
46-
print(">>> pip.main(['install', '--user', 'mistune'])")
51+
print(" %s -m pip install --user mistune" % python)
4752
sys.exit(1)
4853

4954
try:

0 commit comments

Comments
 (0)
0