niner / Inline-Python

Inline::Python for Perl 6
Artistic License 2.0
37 stars 14 forks source link

Install failure : Failed to find dependencies: python2-config #31

Open bazzaar opened 6 years ago

bazzaar commented 6 years ago

Hi,

(I'm not installing to Docker container, otherwise this might be similar to Issue#26)

My zef is up-to-date (ver 0.42) and perl6 is Rakudo Star 2018-04 (in local dir /home/....)

Running on OpenSUSE leap 42.3, python package installed straight from OpenSUSE repository

which python2.7-config /usr/bin/python2.7-config which python2-config /usr/bin/python2-config

@laptoplinux:/usr/bin> file python2-config

python2-config: symbolic link to python2.7-config

This is the error message :

@laptoplinux:~/Documents> zef install Inline::Python

===> Searching for: Inline::Python ===> Updated cpan mirror: https://raw.githubusercontent.com/ugexe/Perl6-ecosystems/master/cpan.json ===> Updated p6c mirror: http://ecosystem-api.p6c.org/projects.json ===> Searching for missing dependencies: python2-config, Distribution::Builder::MakeFromJSON ===> Failed to find dependencies: python2-config Failed to resolve some missing dependencies in block at /home/#####/rakudo/rakudo-star-2018.04/install/share/perl6/site/sources/7926F4F3ED4C81AA5DA2A54C8AE1E03D03424CCE (Zef::Client) line 166 in sub MAIN at /home/#####/rakudo/rakudo-star-2018.04/install/share/perl6/site/sources/E4784A2A0FA00D16808817186E95FE74BEF3FE2D (Zef::CLI) line 137 in block at /home/#####/rakudo/rakudo-star-2018.04/install/share/perl6/site/resources/3065D08F5332CA244672D7F8A05B603F92BB8A7D line 3 in sub MAIN at /home/#####/rakudo/rakudo-star-2018.04/install/share/perl6/site/bin/zef line 2 in block at /home/#####/rakudo/rakudo-star-2018.04/install/share/perl6/site/bin/zef line 2

I'm fairly sure Inline:Python installed and worked on this machine with previous version(s) of Rakudo Star?

bazzaar

ugexe commented 6 years ago

That is not using zef:ver<0.4.2> like you may think, which is evident by the message: http://ecosystem-api.p6c.org/projects.json which in v0.4.2 would read: http://ecosystem-api.p6c.org/projects1.json

It is possible to have zef:ver<0.4.2> installed but for an older version to be used -- this will be fixed in https://github.com/rakudo/rakudo/pull/1812 -- this is due to rakudo choosing the bin script/modules from the first repo it finds them in instead of considering all repos.

The easiest workaround is to pass --exclude=python2-config to zef. The more elaborate workaround is to completely uninstall all versions of zef but the most recent.

bazzaar commented 6 years ago

ugexe, thankyou for your considerable help on this. I did indeed find 2 versions of zef installed

@laptoplinux:~> zef list --installed

===> Found via /home/#####/rakudo/rakudo-star-2018.04/install/share/perl6 CORE:ver<6.c>:auth ===> Found via /home/#####/rakudo/rakudo-star-2018.04/install/share/perl6/site ... zef:ver<0.3.1>:auth zef:ver<0.4.2>:auth

I eventually took the easiest workaround, as you outlined, as I wasn't entirely confident I'd be able to completely remove zef in order to start again.

passing the "--exclude=python2-config" parameter/value to zef did the trick, I see it now used http://ecosystem-api.p6c.org/projects1.json, as you pointed out it should.

@laptoplinux:~> zef --exclude=python2-config install Inline::Python

===> Searching for: Inline::Python ===> 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 pyhelper.c: In function ‘py_call_static_method_kw’: pyhelper.c:293:5: warning: ‘py_retval’ may be used uninitialized in this function [-Wmaybe-uninitialized] return py_retval; ^ pyhelper.c: In function ‘py_call_static_method’: pyhelper.c:311:5: warning: ‘py_retval’ may be used uninitialized in this function [-Wmaybe-uninitialized] return py_retval; ^ pyhelper.c: In function ‘py_call_method’: pyhelper.c:326:5: warning: ‘py_retval’ may be used uninitialized in this function [-Wmaybe-uninitialized] return py_retval; ^ pyhelper.c: In function ‘py_call_method_kw’: pyhelper.c:341:5: warning: ‘py_retval’ may be used uninitialized in this function [-Wmaybe-uninitialized] return py_retval; ^ ===> Building [OK] for Inline::Python:ver<0.3>:auth ===> Testing: System::Query:ver<0.1.4>:auth ===> Testing [OK] for System::Query:ver<0.1.4>:auth ===> Testing: Distribution::Builder::MakeFromJSON:ver<0.4> ===> Testing [OK] for Distribution::Builder::MakeFromJSON:ver<0.4> ===> Testing: Inline::Python:ver<0.3>:auth ===> Testing [OK] for Inline::Python:ver<0.3>:auth ===> Installing: System::Query:ver<0.1.4>:auth ===> Installing: Distribution::Builder::MakeFromJSON:ver<0.4> ===> Installing: Inline::Python:ver<0.3>:auth

johnsaigle commented 6 years ago

@ugexe Thanks this fix also worked for me!