You need to install the python3-devel package in order to build Python
extensions written in C.
----- Original message -----
From: Craig Richards <craig@xxxxxxxxxxxxxxxx>
Sent by: "OpenSource" <opensource-bounces@xxxxxxxxxxxxxxxxxx>
To: IBMi Open Source Roundtable <opensource@xxxxxxxxxxxxxxxxxx>
Cc:
Subject: Re: [IBMiOSS] bpython
Date: Tue, Apr 2, 2019 10:26 AM
Yeah I'm using SSH from a macbook and running bash 4.4 on the IBMi.
bpython is just a fancier interface to the python interpreter - it's not
a
different python runtime..
I got a little further in the bpython install, having installed gcc and
added it to my path in bash.
However my installation still fails, and given Jesse's comments it seems
like there would be issues running it even if I could get through the
install.
For my own edification - I'm not sure if I've done something incorrectly
-
my process was:
Go into my venv and activate it.
Pre-pend '/QOpenSys/pkgs/bin' to my PATH so that gcc could be found
Pip install bpython.
which resulted eventually in the following failure:
Installing collected packages: greenlet, bpython
Running setup.py install for greenlet ... error
Complete output from command /home/RICHARC/pve1/venv/bin/python3 -u
-c
"import setuptools,
tokenize;__file__='/tmp/pip-install-b4t8x_v2/greenlet/setup.py';f=getattr(tokenize,
'open', open)(__file__);code=f.read().replace('\r\n',
'\n');f.close();exec(compile(code, __file__, 'exec'))" install --record
/tmp/pip-record-8e6jy0k0/install-record.txt
--single-version-externally-managed --compile --install-headers
/home/RICHARC/pve1/venv/include/site/python3.6/greenlet:
running install
running build
running build_ext
building 'greenlet' extension
creating build
creating build/temp.os400-powerpc64-3.6
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv
-O3
-Wall -O2 -g -maix64 -O2 -g -maix64 -I/home/RICHARC/pve1/venv/include
-I/QOpensys/pkgs/include/python3.6m -c greenlet.c -o
build/temp.os400-powerpc64-3.6/greenlet.o
In file included from greenlet.c:5:0:
greenlet.h:8:20: fatal error: Python.h: No such file or directory
#include <Python.h>
^
compilation terminated.
error: command 'gcc' failed with exit status 1
----------------------------------------
regards,
Craig
On Tue, 2 Apr 2019 at 15:08, John Yeung <gallium.arsenide@xxxxxxxxx>
wrote:
> On Tue, Apr 2, 2019 at 9:56 AM Craig Richards <craig@xxxxxxxxxxxxxxxx>
> wrote:
> >
> > I'm not married to the idea of using bpython on the IBMi, I just
thought
> it
> > might be a bit nicer for the kind of ad-hoc stuff you sometimes
> investigate
> > using the REPL.
>
> While there have been great strides made in the Python-on-IBM-i story,
> for general exploration *of Python itself* it's still best to use
> mainstream Python distributions on mainstream platforms. Learn Python
> on a PC, Mac, or Linux box, and then take what you've learned and
> bring it to the i.
>
> That said, with modern tools, I find it is plenty easy enough to do
> "ad-hoc" stuff by creating proper Python scripts and modules in an
> editor and running them. If I have to define a function or write a
> loop, I'm already reaching for my editor.
>
> The first priority for interactive and ad-hoc exploration of the PASE
> open source stuff is logging in via SSH and using bash. No green
> screen. You're using SSH, right?
>
> John Y.
> --
> This is the IBMi Open Source Roundtable (OpenSource) mailing list
> To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
> To subscribe, unsubscribe, or change list options,
> visit: [1]
https://lists.midrange.com/mailman/listinfo/opensource
> or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
> Before posting, please take a moment to review the archives
> at [2]
https://archive.midrange.com/opensource.
>
> Help support midrange.com by shopping at amazon.com with our affiliate
> link: [3]
https://amazon.midrange.com
>
--
This is the IBMi Open Source Roundtable (OpenSource) mailing list
To post a message email: OpenSource@xxxxxxxxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: [4]
https://lists.midrange.com/mailman/listinfo/opensource
or email: OpenSource-request@xxxxxxxxxxxxxxxxxx
Before posting, please take a moment to review the archives
at [5]
https://archive.midrange.com/opensource.
Help support midrange.com by shopping at amazon.com with our affiliate
link: [6]
https://amazon.midrange.com
References
Visible links
1.
https://lists.midrange.com/mailman/listinfo/opensource
2.
https://archive.midrange.com/opensource
3.
https://amazon.midrange.com/
4.
https://lists.midrange.com/mailman/listinfo/opensource
5.
https://archive.midrange.com/opensource
6.
https://amazon.midrange.com/
As an Amazon Associate we earn from qualifying purchases.