diff --git a/README.md b/README.md index a13a1d60a4c257e5b442fb6a3c851927a2435386..a0a57e543031943db63ccd69f0427d33996a5121 100644 --- a/README.md +++ b/README.md @@ -66,6 +66,18 @@ python setup.py install ``` ## Blender-python version +Navipy can be interfaced with blender. It is highly recommended to use the same version of packages of blender when doing so, in order to reduce problem of compatibility. +To determine the packages that you will need, you can run the script: `navipy/script/check_blender_versions_pip.py` in blender or via commandline: + +``` +blender -b -P check_blender_versions_pip.py +``` + +It will create a textfile containing all packages used by blender. They can be installed in your virtualenvironment (prior to navipy) by doing: +``` +pip install -r requirement.txt +``` + | Blender version | Python version | | --------------- | -------------- | | 2.79b | 3.5.3 | diff --git a/navipy/scripts/check_blender_versions_pip.py b/navipy/scripts/check_blender_versions_pip.py new file mode 100644 index 0000000000000000000000000000000000000000..105511ab312d6ff6183720e0bc16d769bec26b2f --- /dev/null +++ b/navipy/scripts/check_blender_versions_pip.py @@ -0,0 +1,17 @@ +""" +List all installed packages in a python installation +by using pip. + +It can be used to install a virtual environment, so that it matches +another installation (for example blender) +""" +import pip + + +installed_packages = pip.get_installed_distributions() +installed_packages = sorted(["%s==%s" % (i.key, i.version) + for i in installed_packages]) +with open('requirement.txt', 'w') as cfile: + for line in installed_packages: + print(line) + cfile.write(line+'\n')