Closed zeffii closed 7 years ago
This actually works?! I have been engineering mad science including patching pip into a live python with exec.
Also, python/lib/site-packages (to my understanding) isn't writable with Blender installed as admin on Windozes. Am I right with that?
i've never installed Blender with an installer, I use the portable zip and launch with a shortcut, but unless the user has the site-packages inside ProgramFiles
, there should be no barrier to adding files to the Blender provided python/lib/site-packages
directory.
That is precisely where it is located. C:\Program Files\Blender Foundation\Blender\2.78\python\lib\site-packages
to be exact.
yikes.. of course it is ;(
ok, then on windows PyGame and PyAudio can be injected temporarily into sys.path
. Wherever the user has their py35 distribution with those modules
import sys
local_py35_packages = r'C:\Users\zeffi\Anaconda3\Lib\site-packages`
if not local_py35_packages in sys.path:
sys.path.append(local_py35_packages)
import pygame
import pyaudio
That was what I was working on before. That seemed to function indeed, but orchestrating the baroque waltz of msi
installers, pip
installs and digging up of the paths takes some time. That also has the benefit of solving the writability problems.
On the flip side:
I thought that worked. The os is a naked win 7 vm snapshotted on first boot. Installed Python and Blender, then installed pygame via pip.
The install worked out fine and everything seemed OK:
My personal guess: Blender runs cp 3.5.1 and the installed python is cp 3.5.2. I will attempt to install cp 3.5.1, but that sounds quite far-fetched.
I would not be surprised at all if that was the problem. mismatch dll versions...
What standalone python are you running?
from anaconda3 64bit
C:\Program Files (x86)>python
Python 3.5.2 |Anaconda 4.1.1 (64-bit)| (default, Jul 5 2016, 11:41:13) [MSC v.1900 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Wait? The thing works across 3.5.1 / 3.5.2 and CP / Anaconda?! DLL -problems don't really seem likely.
and : http://www.lfd.uci.edu/~gohlke/pythonlibs/#pygame precompiled.. ?
hope this isn't bogging you down, I think it should be up to the users to get the right version during early development, and lateron take more time to figure out easy installs.
Pip on 3.5.1 fails to find pygame at all.
Well, if I can't set up the thing by hand, I guess having it work is a high priority.
that's the pain of adding dependencies. thanks be to the blendergods that numpy is included :)
Yep. Though including pip wouldn't hurt too much. Also, packaging the blender Python so that one can run it as python ...
.
the pain is also a reason why we (sverchok) don't include any 3rd party stuff yet. hassle.
Well, we are kind of cornered with sound-related stuff. Aud
only lets you play an audio file written to disk by path as a string. Performance would be... interesting.
The compiled package you pointed to:
Whatever that means, 32bit windows vm with 32 bit python 3.5.1
and you win7 version is what? 32 bit ? are you sure? :)
Pretty sure.
Would making a proposal for the inclusion of pip in Blender proper make sense? Getting numpy in was the fruit of such an action.
oh.. >>> wmic os get osarchitecture
C:\Users\zeffi>wmic os get osarchitecture
OSArchitecture
64-bit
can you install win32's python 3.5 anaconda on that image ?
I am going to be afk for about 30min. I will try the Anaconda if you deem it useful. Also, is this a problem inherent to win32? I would be more than happy to drop it like a hot rock if that is what is needed.
drop win32. can't support everything for everyone forever.
Also, is this a problem inherent to win32?
I don't know for sure, but it seems plausable that this is localized to that module. Whereas the error does seems to crop up elsewhere.
Ok, I am back. I will try to set up a x86_64 vm. The only moderately good thing to ever grow out of IE: https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/
I will give win10 a try.
By
Also, is this a problem inherent to win32?
I mean 32-bit windows, not the Python module.
i'm using the Python compiled with Blender, and win10 64bit
all i did was a
python -m pip install pyaudio
, into my local Python installation. Then copied these (or their *nix equivalent) files over into blender's python/lib/site-packages