1. methodinsane's Avatar
    Hi guys,

    Recently started to use python and discovered the 3.2 runtime. I can't see a way to install new libs. There's no pip or easy_install. I tried to install pip manually but it failed. I don't want to necessarily create BlackBerry apps, I just want to write python code on the go but use libraries like requests. Any ideas or help would be appreciated!

    Cheers,
    JP

    Posted via CB10
    02-26-17 02:51 AM
  2. tollfeeder's Avatar
    Maybe this is what you're looking for http://appworld.blackberry.com/webst...ntent/32880889

    Via Pasta CB10
    02-26-17 03:37 AM
  3. methodinsane's Avatar
    Hey,

    Thanks! I actually have that bought and installed. I'll delve into the documentation more. I would to be able to do it from bgshell pro terminal emulator so I can all the command line stuff.

    Cheers,
    JP

    Posted via CB10
    02-26-17 05:39 AM
  4. tollfeeder's Avatar
    02-26-17 05:47 AM
  5. methodinsane's Avatar
    Hey thanks again for the reply.

    I'm trying to figure out how to use pip with the python runtime in bb10. Anyone know if it's possible?

    Cheers,
    JP

    Posted via CB10
    02-27-17 11:55 AM
  6. tollfeeder's Avatar
    thurask to the rescue please!

    Via Pasta CB10
    02-27-17 12:05 PM
  7. thurask's Avatar
    thurask to the rescue please!

    Via Pasta CB10
    Sure, why not.

    What error came up when you tried to install pip manually? If you tried the latest (9.0.1), it doesn't support 3.2. You'll have to find an older version.

    There is this older get-pip.py script for 3.2: https://bootstrap.pypa.io/3.2/get-pip.py
    tollfeeder likes this.
    02-27-17 12:49 PM
  8. methodinsane's Avatar
    Hi Thurask,

    I was executing that version actually. I'm using bgshell. I can copy out the error but I think the hashlib module is missing or maybe it's openssl related. When I run the script from the Helium app I downloaded I don't get any errors. I ran with --user since it doesn't allow me to execute otherwise. But I don't have a notion where pip got installed and it's not available from bgshell.


    Python on bb10 - how to install modules/packages?-img_20170227_213754.png

    I took a screen shot of partial output from bgshell.

    Thanks,
    JP

    Posted via CB10
    02-28-17 02:09 AM
  9. methodinsane's Avatar
    I meant I can't copy from bgshell.

    Posted via CB10
    02-28-17 02:09 AM
  10. methodinsane's Avatar
    Hi,

    Here's the output from Helium. Like I said I user python --user when running this from within Helium.

    Collecting pip<8
    Using cached pip-7.1.2-py2.py3-none-any.whl
    Collecting setuptools
    Using cached setuptools-34.3.0-py2.py3-none-any.whl
    Collecting wheel
    Using cached wheel-0.29.0-py2.py3-none-any.whl
    Collecting packaging>=16.8 (from setuptools)
    Using cached packaging-16.8-py2.py3-none-any.whl
    Collecting six>=1.6.0 (from setuptools)
    Using cached six-1.10.0-py2.py3-none-any.whl
    Collecting appdirs>=1.4.0 (from setuptools)
    Using cached appdirs-1.4.2-py2.py3-none-any.whl
    Collecting pyparsing (from packaging>=16.8->setuptools)
    Using cached pyparsing-2.1.10-py2.py3-none-any.whl
    Installing collected packages: pip, six, pyparsing, packaging, appdirs, setuptools, wheel
    Successfully installed appdirs packaging pip pyparsing setuptools six wheel

    So it looks like it installed. But where?

    Thanks,
    JP

    Posted via CB10
    02-28-17 02:28 AM
  11. thurask's Avatar
    I don't know for sure, but I think Helium's Python environment is inside Helium's private data directory, meaning it can't be accessed from other apps. If you import hashlib and check hashlib.algorithms_available from both Helium and bgshell you should get a reasonable result from Helium. That's why pip and other stuff could install.
    02-28-17 07:43 AM
  12. methodinsane's Avatar
    Hi Thurask,

    I reckon you're right there. I'll try what you said. I thought maybe it would become available within Helium by running a shell script but sadly it didn't work. Seems to me the python impl in BB10 isn't fully ported. Ah well. For now I'm pretty busy with stuff, I just thought it'd be handing to work on some projects on the go. On a separate note I'll certainly look into bb10 dev with python/cascades just for fun, have some projects in mind.

    Thanks for your help and suggestions.

    /JP

    Posted via CB10
    02-28-17 08:51 AM
  13. berradicted_fr's Avatar
    Sure, why not.

    What error came up when you tried to install pip manually? If you tried the latest (9.0.1), it doesn't support 3.2. You'll have to find an older version.

    There is this older get-pip.py script for 3.2: https://bootstrap.pypa.io/3.2/get-pip.py
    Hello !

    I tried get-pip.py ... but no success so far .. any clue ?

    >./get-pip.py
    Could not find platform independent libraries <prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    Collecting pip<8
    Could not find a version that satisfies the requirement pip<8 (from versions: )
    No matching distribution found for pip<8
    >
    >uname -a
    QNX Silver10 8.0.0 2018/02/21-10:54:19EST MSM8974AA_ES1.1_PVS7SB1_WINDERMERE4ROW_Rev:05 armle
    11-25-18 05:37 PM
  14. thurask's Avatar
    Hello !

    I tried get-pip.py ... but no success so far .. any clue ?

    >./get-pip.py
    Could not find platform independent libraries <prefix>
    Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
    Collecting pip<8
    Could not find a version that satisfies the requirement pip<8 (from versions: )
    No matching distribution found for pip<8
    >
    >uname -a
    QNX Silver10 8.0.0 2018/02/21-10:54:19EST MSM8974AA_ES1.1_PVS7SB1_WINDERMERE4ROW_Rev:05 armle
    I'm not sure if the get-pip scripts for EOL Python versions (like 3.2) still work.
    11-26-18 03:43 PM

Similar Threads

  1. How about a TCL BlackBerry Mobile Playbook?
    By louzer in forum BlackBerry PlayBook
    Replies: 12
    Last Post: 04-03-17, 07:01 PM
  2. Reactions to the KeyOne from Passport users...
    By ratfinkstooley in forum BlackBerry Passport
    Replies: 568
    Last Post: 04-01-17, 08:01 AM
  3. Replies: 2
    Last Post: 03-04-17, 06:43 AM
  4. Now's the perfect time to buy the Priv?
    By loveallnight in forum General BlackBerry News, Discussion & Rumors
    Replies: 34
    Last Post: 03-01-17, 06:06 PM
  5. Replies: 1
    Last Post: 02-26-17, 10:59 AM
LINK TO POST COPIED TO CLIPBOARD