Author Topic: How to? python, pip and language tool  (Read 3279 times)

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 284
  • Karma: +5/-0
    • View Profile
How to? python, pip and language tool
« on: June 11, 2024, 08:28:55 pm »
i have a need to run something that can translate text and the tools provided now all seem to use python and require pip etc.

One can use a standard OS/2 command prompt an run the command as Python 3.7 and onward comes with an ensurepip module.
python -m ensurepip --upgrade
it seem to install version 23, but another run, upgrade it to version 24.

Am aware that it may not know how to handle ArcaOS and OS/2, but it may be possible to iron out some things.

How can one install a downloadable AI tool, translation tool etc. ?
I wouldn't mind a tool to just select what to install.

Example of google translator, but the others seem to have similar issues as seen below.

[C:\usr\lib\python3.9\site-packages]python pip install googletrans
WARNING: The directory 'd:/home/.cache/pip' or its parent directory is not owned
 or is not writable by the current user. The cache has been disabled. Check the
permissions and owner of that directory. If executing pip with sudo, you should
use sudo's -H flag.

Collecting googletrans
  Downloading googletrans-3.0.0.tar.gz (17 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  pip subprocess to install build dependencies did not run successfully.
  exit code: 2

  [1 lines of output]
  C:\USR\BIN/python.exe: can't open file 'C:/usr/lib/python3.9/site-packages/C:/
usr/lib/python3.9/site-packages/pip': [Errno 2] No such file or directory
  [end of output]

 note: This error originates from a subprocess, and is likely not a problem wit
h pip.
error: subprocess-exited-with-error

pip subprocess to install build dependencies did not run successfully.
exit code: 2

See above for output.

note: This error originates from a subprocess, and is likely not a problem with
pip.

//Jan-Erik
« Last Edit: June 12, 2024, 07:48:08 am by Jan-Erik Lärka »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5084
  • Karma: +117/-1
    • View Profile
Re: How to? python, pip and language tool
« Reply #1 on: June 12, 2024, 06:20:28 am »
Maybe try with virtualenv? Not sure if it works on OS/2 with Python3, it does work on Python2, Bitwise did work to get it working for building Mozilla.

Jan-Erik Lärka

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 284
  • Karma: +5/-0
    • View Profile
Re: How to? python, pip and language tool
« Reply #2 on: June 12, 2024, 06:30:58 pm »
I'm not familiar with python, it's something-linux, so I need your help to grasp what to do.
« Last Edit: June 13, 2024, 07:53:02 am by Jan-Erik Lärka »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 5084
  • Karma: +117/-1
    • View Profile
Re: How to? python, pip and language tool
« Reply #3 on: June 13, 2024, 03:32:17 am »
Hmm, looking, virtualenv has been completely rewritten, so doubtful the patches would work. Also it has been years since I played with trying to get it to work.
Trying to do what you tried to do leads me to believe something is broken with Python3 and pip, it worked well with Python2, even building needed libraries.