WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: pip3 install websocket-client  (Read 3139 times)

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
pip3 install websocket-client
« on: April 05, 2020, 01:35:37 PM »
 :) Hello here friends  :)

Well, working on a DSP engine (digital sound processing) and i need the python3 websocket-client for it.

i can install it with this :
Code: [Select]
tc@DSP-Player:~$ sudo pip3 install websocket-clientEverything is working then, but it does not survive reboot ofcause.

Whats the best / easiest way getting there?

Thanks; Jesper...


Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14752
Re: pip3 install websocket-client
« Reply #1 on: April 05, 2020, 01:50:55 PM »
The most efficient way is to compile it and make an extension.

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: pip3 install websocket-client
« Reply #2 on: April 06, 2020, 03:22:37 AM »
Yes, you are ofcause right.
But.

Is it okay to make a directory which contains the package(s) perhaps like:

Code: [Select]
[sudo]

mkdir /temp
cd /temp
mkdir pywebsocket
cd pywebsocket
mkdir -p usr/local/bin/python3.7/site-packages (or where they are excatly!)
(maybee split out more dirs here)

cd /temp
mksquashfs pywebsocket py_websock.tcz


Then move it to tcedir & add to .onboot.lst
Would it be okay, or bad idea?

Jesper.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14752
Re: pip3 install websocket-client
« Reply #3 on: April 06, 2020, 03:48:46 AM »
Many python apps install easily, i.e.
Code: [Select]
$ tce-load -i compiletc python3.6-dev
$ tar xf python_package.tar.gz
$ cd python_package
$ python3.6 setup.py build
$ mkdir /tmp/pkg
$ sudo python3.6 setup.py build install --root=/tmp/pkg

Then, to make an extension:
Code: [Select]
$ tce-load -i squashfs-tools
$ cd /tmp
$ sudo mksquashfs pkg/ python_package.tcz

In addition, to make things smaller, you can delete any _pycache directories before making the extension

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: pip3 install websocket-client
« Reply #4 on: April 06, 2020, 05:34:01 AM »
Yes... look's like i could try that  :)

Is there a way to see which package websocket-client the pip3 installs on the raspbian???
Better to use a know working one  8)

Jesper.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14752
Re: pip3 install websocket-client
« Reply #5 on: April 06, 2020, 06:27:03 AM »
Usually when you use the pip install command it tells you what it is installing.

You could also use the tar.gz file here https://pypi.org/project/websocket_client/#files

Offline lykkedk

  • Full Member
  • ***
  • Posts: 182
Re: pip3 install websocket-client
« Reply #6 on: April 08, 2020, 10:20:19 AM »
Dear Juanito  :)

Thanks for helping!.

I succesfully build and use now two self"compiled" websocket & six .tcz's

Jesper.