WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [Solved] need help to get a python3.9 module to corrrectly install  (Read 1731 times)

aus9

  • Guest
Hi

I need help trying to get a python module to install correctly on x86 or TC32.
all commands below are by root

steps
1) load python3.9-setuptools as the package I am trying to build does not like python3.6-pip or python3.6 as its looking for python3.7 or higher

2) if python3 sym links to python3.6 fix
Code: [Select]
rm -rf /usr/local/bin/python3
ln -s /usr/local/bin/python3.9 /usr/local/bin/python3

3) From the internet I try....and my target module is called dataclasses
Code: [Select]
python3.9 -m ensurepip --upgrade
# At time of write installs pip-20.2.3
python3.9 -m pip install dataclasses

I am half tricked as /usr/local/lib/python3.9/site-packages/dataclasses.py is created and so I try to compile vte-2.91 using meson and get a fail

4) From the internet I then try to confirm what modules I have installed by
Code: [Select]
python3.9
# input changes next line I input
help ("modules")
# output

Please wait a moment while I gather a list of all available modules..SNIP module list

curses              pkgutil             types
_pydecimal       dataclasses         platform            typing
_pyio               datetime

5) keeping python3.9 interactive open the bottom of the output says
Code: [Select]
Enter any module name to get more help.  Or, type "modules spam" to search
for modules whose name or summary contain the string "spam"

# I input
dataclasses
# output is
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'dataclasses' is not defined

any help please?

BTW, vte based terminals include, gnome-terminal which is already built against vte-2.90 by vte-gtk3 TCE
lxterminal tilda sakura lilyterm etc

PS if I atttempt to compile with meson/ninja the error is dataclasses not found so I know module is not installed correctly
« Last Edit: August 02, 2023, 08:23:31 PM by Paul_123 »

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1249
Re: need help to get a python3.9 module to corrrectly install
« Reply #1 on: August 02, 2023, 06:41:22 AM »
Meson is a python package, did you install meson for python3.9

If you have multiple pythons installed, I find that it is easier to keep track of it by using a python virtual environment….put this on persistent storage.

aus9

  • Guest
Re: need help to get a python3.9 module to corrrectly install
« Reply #2 on: August 02, 2023, 09:42:28 AM »
Quote
did you install meson for python3.9

no that must be it. damn

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1249
Re: need help to get a python3.9 module to corrrectly install
« Reply #3 on: August 02, 2023, 03:25:30 PM »
Documentation on python virtual environments.

https://docs.python.org/3/library/venv.html

aus9

  • Guest
Re: need help to get a python3.9 module to corrrectly install
« Reply #4 on: August 02, 2023, 07:06:35 PM »
Hi Paul_123

I am thinking about your link but I have a few other options too.
One being downgrade my terminal(s) source version to accept vte-2.90 and then other things like your suggestion

thanks for your help

Hi Rich
please mark as solved.
cheers