Module not currently installable due to python2.7:from<native>
Python 2.7 is currently installed on my system, and python2-config is not available. Here is the output from my attempt at installation:
$ zef install --exclude=python2-config Inline::Python
===> Searching for: Inline::Python
===> Searching for missing dependencies: python2.7:from<native>, Distribution::Builder::MakeFromJSON
===> Failed to find dependencies: python2.7:from<native>
Failed to resolve some missing dependencies
***
Seems like there's an issue with zef and/or Distribution::Builder::MakeFromJSON. If python2-config is not available it should report a failing build-dependency before even getting to the runtime dependency.
Also without python2-config Inline::Python cannot build. You'll need some python2-devel or python2-dev or python-dev or whatever it's called on your distro package.
Using --exclude=python2-config is explicitly ignoring python2-config, otherwise there would be a dependency error. On that same note one can also do --exclude=python2.7.
Inline::Python installs, see this workflow :
Using ugexe suggestion, gives a hint of where the issue is (as niner points out) :
bazzaar@linux-box:~> zef install --exclude=python2-config --exclude=python2.7 Inline::Python
===> Searching for: Inline::Python
===> Updating p6c mirror: http://ecosystem-api.p6c.org/projects1.json
===> Updating cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updated p6c mirror: http://ecosystem-api.p6c.org/projects1.json
===> Updated cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Building: Inline::Python:ver<0.3>:auth<cpan:NINE>
Could not find `Distribution::Builder::MakeFromJSON` at line 0 in:
file#/home/bazzaar/.zef/store/Inline-Python.git/aa7d4b51078c35f050eb8ff35d44d55ab7108f71
inst#/home/bazzaar/.perl6
inst#/home/bazzaar/rakudo/rakudo-star-2019.03/install/share/perl6/site
inst#/home/bazzaar/rakudo/rakudo-star-2019.03/install/share/perl6/vendor
inst#/home/bazzaar/rakudo/rakudo-star-2019.03/install/share/perl6
ap#
nqp#
perl5#
in block <unit> at -e line 1
===> Building [FAIL]: Inline::Python:ver<0.3>:auth<cpan:NINE>
Aborting due to build failure: Inline::Python:ver<0.3>:auth<cpan:NINE> (use --force-build to override)
install Distribution::Builder::MakeFromJSON :
bazzaar@linux-box:~> zef install Distribution::Builder::MakeFromJSON
===> Searching for: Distribution::Builder::MakeFromJSON
===> Searching for missing dependencies: System::Query
===> Testing: System::Query:ver<0.1.4>:auth<github:tony-o>
===> Testing [OK] for System::Query:ver<0.1.4>:auth<github:tony-o>
===> Testing: Distribution::Builder::MakeFromJSON:ver<0.4>
===> Testing [OK] for Distribution::Builder::MakeFromJSON:ver<0.4>
===> Installing: System::Query:ver<0.1.4>:auth<github:tony-o>
===> Installing: Distribution::Builder::MakeFromJSON:ver<0.4>
Seperately, as per niner guidance installed system package python_devel :
Installed Inline::Python :
bazzaar@linux-box:~> zef install Inline::Python
===> Searching for: Inline::Python
===> Building: Inline::Python:ver<0.3>:auth<cpan:NINE>
===> Building [OK] for Inline::Python:ver<0.3>:auth<cpan:NINE>
===> Testing: Inline::Python:ver<0.3>:auth<cpan:NINE>
===> Testing [OK] for Inline::Python:ver<0.3>:auth<cpan:NINE>
===> Installing: Inline::Python:ver<0.3>:auth<cpan:NINE>
Confirmed Inline::Python working with Perl6 and Python matplotlib
@bazzaar thats a bit odd because zef install Inline::Python should be finding and installing Distribution::Builder::MakeFromJSON -- at least it does for me locally, and it shows up in Xliff's output as needing to be installed.
@ugexe : Xliff's post was from Aug 2018, so maybe Rakudo Star 2018.04 ? I also remember finding difficulty installing Inline::Python back then because I didn't have python2-config installed [see #31].
I'm now using the Rakudo Star 2019.03.01 RC2 version. I didn't do anything funky with any modules and zef.
Maybe some change has been made to Distribution::Builder::MakeFromJSON in the last day or two, so that zef now knows how to find it?
@bazzaar Xliff is showing the expected behavior, and the same behavior I'm witnessing. I can only assume you/rakudo-star has some old version of Distribution::Builder::MakeFromJSON installed and thus it wasn't needed.
@ugexe : it's a bit of a mystery. I'd disabled the previous R* installation by moving it into another directory not in my Path, and both it and the new one, are installed from source into my user account on my laptop. Very simple setup.
Gosh! My ears are burning! :)
At any rate, since I saw this in email, I tried to install it again, normally. I get the following:
$ zef install Inline::Python
===> Searching for: Inline::Python
===> Updating cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updating p6c mirror: http://ecosystem-api.p6c.org/projects1.json
===> Updated cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updated p6c mirror: http://ecosystem-api.p6c.org/projects1.json
===> Searching for missing dependencies: python2.7:from<native>, Distribution::Builder::MakeFromJSON, python2-config:from<bin>
===> Failed to find dependencies: python2.7:from<native>, python2-config:from<bin>
Failed to resolve some missing dependencies
Currently, I am on Python 2.7 via Kubuntu 19.04 beta.
ii python 2.7.16-1 amd64 interactive high-level object-oriented language (Python2
Is there something else I need to install at the package level that's missing?
Xliff, as niner indicates above, try to find and install package named something like :
python-devel
python2-devel
python-dev
python2-dev
@bazzaar - Right. OK. With that done, I get the following...
===> Searching for: Inline::Python
===> Updating cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updating p6c mirror: http://ecosystem-api.p6c.org/projects1.json
===> Updated cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan1.json
===> Updated p6c mirror: http://ecosystem-api.p6c.org/projects1.json
===> Searching for missing dependencies: Distribution::Builder::MakeFromJSON
===> Searching for missing dependencies: System::Query
===> Building: Inline::Python:ver<0.3>:auth<cpan:NINE>
This representation (Null) does not support elems (for type VMNull)
in method build at /usr/local/home/cbwood/.zef/store/Inline-Python.git/7ceee0baf3c47cdb35fcf6bfa3e83d43b0fc3e8c/.precomp/7243159943444FC7021CBC6D58444EB1734BD876/86/8608FF83A46EBF0B38AF0AE87BE87F7C8EF704B2 line 35
in block <unit> at -e line 1
===> Building [FAIL]: Inline::Python:ver<0.3>:auth<cpan:NINE>
Aborting due to build failure: Inline::Python:ver<0.3>:auth<cpan:NINE> (use --force-build to override)
This is using...
$ perl6 --version
This is Rakudo version 2019.03.1-149-g7b4dd3006 built on MoarVM version 2019.03-61-g645a70c0d
implementing Perl 6.d.
@Xliff : maybe try to install both :
- Distribution::Builder::MakeFromJSON
- System::Query
individually with zef install *
I had to do the first one like that as you can see from my workflow.