MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / check_pip_env

Function check_pip_env

imperative/python/megengine/_env_initlization.py:19–37  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

17
18
19def check_pip_env():
20 filter_package_name = 'megbrain'
21 need_package_name = 'megengine'
22
23 import pkg_resources
24
25 installed_packages = pkg_resources.working_set
26 installed_packages_list = sorted(["%s" % i.key.lower() for i in installed_packages])
27 assert (
28 filter_package_name not in installed_packages_list
29 ), "Your python packages may be corrupted by installing internal&external versions at the same time. To fix it, try to uninstall {} and {}, then install {} again".format(
30 filter_package_name, need_package_name, need_package_name
31 )
32
33 assert (
34 "megenginelite" not in installed_packages_list
35 ), "Your python packages may be corrupted by installing internal&external versions at the same time. To fix it, try to uninstall megenginelite and {}, then install {} again".format(
36 need_package_name, need_package_name
37 )
38
39
40def check_termux():

Callers 1

check_miscFunction · 0.70

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected