Skip to content
Snippets Groups Projects
Commit 1a83514b authored by Olivier Bertrand's avatar Olivier Bertrand
Browse files

Add possibility to check blender installation

parent d11d27f8
No related branches found
No related tags found
No related merge requests found
......@@ -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 |
......
"""
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')
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment