diff options
author | Isaac <isaclien9752@gmail.com> | 2025-08-18 01:14:41 -0400 |
---|---|---|
committer | Isaac <isaclien9752@gmail.com> | 2025-08-18 01:14:41 -0400 |
commit | 5fb5906f45a20652b8cbadc5657df9ca506f11db (patch) | |
tree | 3cbb3fb288e379241bf385739ce530d946de2c01 | |
parent | dc612a18b60341b233fcac00f99405d98b61c01a (diff) | |
download | blenxy-5fb5906f45a20652b8cbadc5657df9ca506f11db.tar.gz blenxy-5fb5906f45a20652b8cbadc5657df9ca506f11db.zip |
testing new git repo / update blenxy's required modules
-rw-r--r-- | required_modules.py | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/required_modules.py b/required_modules.py index fe5ded3..ae2b44b 100644 --- a/required_modules.py +++ b/required_modules.py @@ -1,5 +1,7 @@ import bpy from subprocess import run +from . import file_ops +import numpy # get python's binary path (literally my saviour) py_bin = bpy.app.binary_path_python @@ -16,10 +18,11 @@ try: import lxml except: # hecking install pip (ensurepip) + required modules - run([py_bin, "-B", "-m", "ensurepip"]) + run([py_bin, "-B", "-m", "ensurepip"]) # update basic modules then download new modules + # before that, rename the numpy folder to be able to update numpy run(pip_install + upd_mods) - run(pip_install + new_mods) + run(pip_install + new_mods) print("First exit!") bpy.ops.wm.quit_blender() exit(0) @@ -27,3 +30,9 @@ except: # print module's versions installed print("pip %s is installed!" % (pip.__version__)) print("lxml %s is installed!" % (lxml.__version__)) +# for those who have installed blenxy before, update numpy +# hacky way to do it but it is the only way that works +if (numpy.__version__ != "1.18.5"): + file_ops.rm_folder(numpy.__path__[0]) # remove the installation folder + run(pip_install + ["numpy==1.18.5"]) # install the newer version +print("numpy %s is installed!" % (numpy.__version__)) |