Page 1 of 1

missing pydoc module

Posted: 30 Oct 2018, 19:19
by nick613
I just installed PyCharm but the console and all debugging was not starting because it said it couldn't find the pydoc module. I checked in shell and it seems that it's missing from the Python installation. Is there any reason for this and is there any way to fix it?
Thanks!

missing pydoc module

Posted: 30 Oct 2018, 22:32
by ncmprhnsbl
yes, pydoc(among other stuff) is stripped from the default porteus, mainly because it's not needed for *most* apps to run..
however, it is needed for some packages to build, and python dev stuff..
probably it should make it's way into 05-devel.xzm, but afaics, it doesn't..
so, for the moment, what i'd do is grab the full python package and either grab what you need from it or make a module of the whole thing..
check to match the version with installed version maybe.

missing pydoc module

Posted: 31 Oct 2018, 00:15
by nick613
Is it possible to just install a fresh copy of python over the old one?

missing pydoc module

Posted: 31 Oct 2018, 00:29
by ncmprhnsbl
you mean in the live system, saved to changes or in the extracted 001-core? (or as a module loaded on top)
i'd say yes to any of these.. shouldn't break anything.

missing pydoc module

Posted: 31 Oct 2018, 02:32
by nick613
Cool. So what would be the simplest option to prevent any future problems? I'd like to use the OS primarily for python development and so I'd like to have all the default modules work without any hitches.

missing pydoc module

Posted: 31 Oct 2018, 06:10
by ncmprhnsbl
well, the simplist(and safest) would be to make a python module and put it in /modules. that way if there's a problem it's easy to roll back.
if all goes well you could then rebuild 001-core with the full package.
by: (# denotes root terminal)

Code: Select all

#cp /mnt/sd*/porteus/base/001-core.xzm /tmp (or any ext* partition)
#cd /tmp (or whereever)
#mkdir extract
#xzm2dir 001-core.xzm extract
then either
#xzm2dir python-module.xzm extract
or
#removepkg -r extract python2 (might not be necessary if version are same)
#installpkg -r extract python2*  (*wildcard saves typing the whole  pkg name)
then
#dir2xzm extract 001-core-m.xzm (m for modified)
replace in base
for reference, here's what is removed:

Code: Select all

	rm -rf usr/lib${SUFFIX}/python2.7/distutils/tests/*
	rm -rf usr/lib${SUFFIX}/python2.7/unittest/test/*
	rm -rf usr/lib${SUFFIX}/python2.7/test/*
	rm -rf usr/lib${SUFFIX}/python2.7/ctypes/test/*
	rm -rf usr/lib${SUFFIX}/python2.7/json/tests/*
	rm -rf usr/lib${SUFFIX}/python2.7/bsddb/test/*
	rm -rf usr/lib${SUFFIX}/python2.7/email/test/*
	rm -rf usr/lib${SUFFIX}/python2.7/lib-tk/test/*
	rm -rf usr/lib${SUFFIX}/python2.7/sqlite3/test/*
	rm -rf usr/lib${SUFFIX}/python2.7/lib2to3/tests/*
	rm -rf usr/lib${SUFFIX}/python2.7/idlelib/*
	rm -rf usr/lib${SUFFIX}/python2.7/lib-tk/*
	rm -rf usr/lib${SUFFIX}/python2.7/lib2to3/*
	rm usr/lib${SUFFIX}/python2.7/pydoc.py* 2>/dev/null
	rm usr/lib${SUFFIX}/python2.7/tabnanny.py* 2>/dev/null

missing pydoc module

Posted: 01 Nov 2018, 18:36
by nick613
I'm sorry, but you may have to hold my hand here. How would I make a python module? I downloaded the tar.xz from the python website, but how would I make that into a module? I tried to extract it and build it with dir2xzm but that didn't seem to do the trick.

missing pydoc module

Posted: 01 Nov 2018, 22:31
by ncmprhnsbl
i didn't think to ask: python 2 or 3? i'm guessing probably 3 since 2 is in line to be deprecated.
anyway here's links for slackware packages:
python2:
http://ftp.slackware.com/pub/slackware/ ... 6_64-3.txz
python3:
http://ftp.slackware.com/pub/slackware/ ... 6_64-1.txz
in your filemanager rightclick menu you should find "convert txz to xzm" or "convert slackware to module" or something like that.
the tar.xz from the python website is the source files and would need to be compiled, which is a whole other ball game.
btw, which desktop are you using?

missing pydoc module

Posted: 02 Nov 2018, 04:35
by nick613
Yeah, I'm looking to set up python 3 but I'd probably get 2 as well in case I need it later.
I'm using Cinnamon for my desktop.
So I downloaded and converted into a module. It's inserting into the OS properly because it's taking over my python3 command, but I'm getting an error:
python3: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /usr/lib64/libpython3.6m.so.1.0)
The machine is running 2.27. How can this be updated?

missing pydoc module

Posted: 02 Nov 2018, 05:06
by ncmprhnsbl
hmm, i feared that something like that might be the case, since we're using slackware current which is rolling, and since the april release, they've moved on with a few things. glibc being one of them..
it might be enough to make an updated glibc http://ftp.slackware.com/pub/slackware/ ... 6_64-2.txz
but, this might mess up other stuff(i don't fully understand this)
we are currently working on getting a new updated release together, hopefully soon..
at some point when slackware 15 is released, and repo becomes semi-fixed again, this sort of problem won't occur..

missing pydoc module

Posted: 02 Nov 2018, 05:27
by jssouza
Maybe try the other way round.
Here are the python packages from Slackware current at the time when Cinnamon was built for Porteus 4. These might work for your use case.

python-2.7.14-x86_64-1.txz
python3-3.6.5-x86_64-2.txz

missing pydoc module

Posted: 02 Nov 2018, 18:23
by nick613
Thanks for the help. I tried what jssouza suggested and the module loads nicely, and now pydoc3 seems to be functioning properly, as well as PyCharm. Thanks for all your help.

missing pydoc module

Posted: 02 Nov 2018, 23:38
by ncmprhnsbl
:good:
and thank you jssouza, too!