1

I'm using Blender and Python and want to give the .py file to other users to use my script... My script uses external modules (like NumPy) which will rise the errors (like can't find module xxxx).

Not all people can install NumPy (or even Python :D) as many Blender users are just artists.

Another note is that NumPy doesn't work with Blender (I install it in the system's Python, then delete Blender Python so it relies on the system Python).

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
Mohamed Sakr
  • 409
  • 4
  • 16
  • It sounds like you are running a script that doesn't work with blender because it requires `numpy`, but you want to be able to have other people (who do not have python installed) use the script with blender. If it doesn't work for you with blender, then it won't work for other people either. – askewchan Feb 25 '13 at 15:12
  • I think you would find this conversation interesting: http://www.mail-archive.com/bf-committers@blender.org/msg11306.html – tatsuhirosatou Feb 25 '13 at 15:22
  • numpy work only if i delete blender python (blender then will rely on system python and it will work) – Mohamed Sakr Feb 26 '13 at 16:35

1 Answers1

1

If you want to distribute your code with external dependencies then you should build a Python egg. The .egg format was created to solve the issue you are dealing with. It is a self-contained release of your code with dependencies and meta-data. Here is some information on how create Python eggs.

Community
  • 1
  • 1
tatsuhirosatou
  • 25,149
  • 14
  • 39
  • 40