Closed deeplook closed 9 years ago
You are 100% correct! For version 0.5 and 0.6 the included python should be fixed up to work anywhere, but I didn't do anything special for any other binaries. They were included just because the directory was copied. With version 0.5 you can actually install packages using pip by running it through python directly. Something like "python -m pip list" to list packages.
For the new release 0.7 I have a new way to do it from the notebook using new magic "%require packagename". This new magic is part of package "pineapple". So you do:
import pineapple
%require bokeh
Based on your feedback I will also include a working version of the pip tool so you can use the command line, that is a great idea.
Just committed a change that should make the pip script inside the app work from the command line. Because it is inside Pineapple, it has to figure out how to call the right version of python so it is a bit "nonstandard".
The pip shebang line in 0.8.0 (python2.7 full) is:
#!/Users/Shared/Jenkins/Home/workspace/PineappleMultiBuild/pineapple/build_full/python2.7/bin/python2.7
To get it working, I changed it to:
#!/Applications/Pineapple.app/Contents/Resources/python2.7/bin/python
Using the magic %require crashes python on my installation.
Trying to install the lib on the command line also crashes the (local) python interpreter:
jsilence@zoe /Applications/Pineapple.app/Contents/bin % ./pip3.5 install foobar
Collecting foobar
Could not find a version that satisfies the requirement foobar (from versions: )
dyld: lazy symbol binding failed: Symbol not found: _fdopendir$INODE64
Referenced from: /Applications/Pineapple.app/Contents/bin/./../Frameworks /Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/../../../../Python
Expected in: /usr/lib/libSystem.B.dylib
dyld: Symbol not found: _fdopendir$INODE64
Referenced from: /Applications/Pineapple.app/Contents/bin/./../Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/../../../../Python
Expected in: /usr/lib/libSystem.B.dylib
./pip3.5: line 3: 55494 Trace/BPT trap: 5 (core dumped) ${BASH_SOURCE%/*}/../Frameworks/Python.framework/Versions/3.5/Resources/Python.app/Contents/MacOS/Python -m pip "$@"
The referenced library libSystem.B.dylib
does not exist in the Frameworks directory tree. It seems to be directly referenced in the python3.5 binary stub. It does however exist in /usr/lib:
133 jsilence@zoe /Applications/Pineapple.app/Contents/bin % ls /usr/lib/libSystem.B.dylib
/usr/lib/libSystem.B.dylib*
I'm trying to find a way to add packages to an existing Pineapple installation, after all it comes with pip and all that Jazz in
/Applications/Pineapple.app/Contents/Resources/python2.7/bin
. So I'd be interested in Bokeh first, but when trying to use thepip
bundled in Pineapple I see this weird shebang line:#!/Users/nwhitehead/pineapple/build/python2.7/bin/python
which doesn't point to the Python installation bundled with Pineapple... If it would I assume installing some additional stuff might "just work", right?In fact, I can run in that
bin
directory above:./python pip install requests
which works (and I think requests wasn't there before, which is slightly surprising). But I'm getting a long number of compilation errors if I try to install bokeh like this.