python2.7 missing module binascii

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

python2.7 missing module binascii

francis.dos.santos
Hi,

In trying to get hgweb running, I stumbled upon the fact that it will try to import binascii.
Said module is missing from the ports package python-2.7.14p0

Regards,

Reply | Threaded
Open this post in threaded view
|

Re: python2.7 missing module binascii

Remi Pointel
On 01/04/18 13:43, [hidden email] wrote:
> Hi,
>
> In trying to get hgweb running, I stumbled upon the fact that it will try to import binascii.
> Said module is missing from the ports package python-2.7.14p0
>
> Regards,
>


Hi,

$ python2.7 -c "import binascii"
$

Seems to work fine here, maybe with details I could help?

Regards,

Remi.

Reply | Threaded
Open this post in threaded view
|

Re: python2.7 missing module binascii

francis.dos.santos
Remi,

I do hope you can help. It's more of a 'running in a chrooted environment' problem.

/usr/sbin/chroot -g www -u www /var/www /usr/local/bin/python2.7

Python 2.7.14 (default, Dec 22 2017, 13:48:08)
[GCC 4.2.1 Compatible OpenBSD Clang 5.0.0 (tags/RELEASE_500/final)] on openbsd6
Type "help", "copyright", "credits" or "license" for more information.
>>> import binascii
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: Cannot load specified object

Imports like locale and os succeed while binascii and dbhash do not. Since I could
not find a binascii.py, I assumed it was missing. For the record, I did run
/usr/sbin/chroot /var/www /sbin/ldconfig and /usr/local/lib/python2.7/lib-dynload
was among the directories. Maybe the command got truncated?

Thanks,

----- Mensaje original -----
De: Remi Pointel <[hidden email]>
Para: francis dos santos <[hidden email]>, The OpenBSD ports mailing-list <[hidden email]>
Enviado: Thu, 11 Jan 2018 16:41:21 -0300 (ART)
Asunto: Re: python2.7 missing module binascii

On 01/04/18 13:43, [hidden email] wrote:
> Hi,
>
> In trying to get hgweb running, I stumbled upon the fact that it will try to import binascii.
> Said module is missing from the ports package python-2.7.14p0
>
> Regards,
>


Hi,

$ python2.7 -c "import binascii"
$

Seems to work fine here, maybe with details I could help?

Regards,

Remi.

Reply | Threaded
Open this post in threaded view
|

Re: python2.7 missing module binascii

Stuart Henderson
On 2018/01/11 17:18, [hidden email] wrote:

> Remi,
>
> I do hope you can help. It's more of a 'running in a chrooted environment' problem.
>
> /usr/sbin/chroot -g www -u www /var/www /usr/local/bin/python2.7
>
> Python 2.7.14 (default, Dec 22 2017, 13:48:08)
> [GCC 4.2.1 Compatible OpenBSD Clang 5.0.0 (tags/RELEASE_500/final)] on openbsd6
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import binascii
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: Cannot load specified object
>
> Imports like locale and os succeed while binascii and dbhash do not. Since I could
> not find a binascii.py, I assumed it was missing. For the record, I did run
> /usr/sbin/chroot /var/www /sbin/ldconfig and /usr/local/lib/python2.7/lib-dynload
> was among the directories. Maybe the command got truncated?

You may get some clues from trying it with LD_DEBUG set in the environment.

Reply | Threaded
Open this post in threaded view
|

Re: python2.7 missing module binascii

francis.dos.santos
Stuart, Remi,

This was just the thing that I needed. I had to run ldd recursively.
I'm running into other problems, hgweb tries to import org.python.core,
but I'm not running Jython. I consider the loading of shared libs
as solved.

Regards,

----- Mensaje original -----
De: Stuart Henderson <[hidden email]>
Para: francis dos santos <[hidden email]>
CC: Remi Pointel <[hidden email]>, The OpenBSD ports mailing-list <[hidden email]>
Enviado: Thu, 11 Jan 2018 19:37:59 -0300 (ART)
Asunto: Re: python2.7 missing module binascii

On 2018/01/11 17:18, [hidden email] wrote:

> Remi,
>
> I do hope you can help. It's more of a 'running in a chrooted environment' problem.
>
> /usr/sbin/chroot -g www -u www /var/www /usr/local/bin/python2.7
>
> Python 2.7.14 (default, Dec 22 2017, 13:48:08)
> [GCC 4.2.1 Compatible OpenBSD Clang 5.0.0 (tags/RELEASE_500/final)] on openbsd6
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import binascii
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: Cannot load specified object
>
> Imports like locale and os succeed while binascii and dbhash do not. Since I could
> not find a binascii.py, I assumed it was missing. For the record, I did run
> /usr/sbin/chroot /var/www /sbin/ldconfig and /usr/local/lib/python2.7/lib-dynload
> was among the directories. Maybe the command got truncated?

You may get some clues from trying it with LD_DEBUG set in the environment.