0

I have an armv7 embedded device. There is a yocto linux running on this device. There is no pip installed in it so i cannot install web3 using ..

pip install web3

How can I install web3 or any python module without using pip? I have tried searching the recipe of web3.py but couldn't find any.

Can I cross compile the web3 module? how to do that?

how can build from source work for this module?

what about the other dependencies required for it?

I am not a full time Linux or python developer so please tell me about the first step I need to follow?

TylerH
  • 20,799
  • 66
  • 75
  • 101
Hsn
  • 1,168
  • 2
  • 16
  • 39
  • download `get_pip.py` and install `pip`. – furas Jul 15 '19 at 12:43
  • You can also try to build from source, if it is available – Piotr Kamoda Jul 15 '19 at 12:44
  • https://github.com/ethereum/web3.py.. I think build from source is not available.. – Hsn Jul 15 '19 at 12:45
  • if module uses only code in Python then there is nothing to compile and you could download it and use it. My may add folder with module to `sys.path` before `import` – furas Jul 15 '19 at 12:46
  • it seems it use only code in Python so there is no compile and you can use it at once. After download you can eventually use `python setup.py install` – furas Jul 15 '19 at 12:47
  • Thanks..let me try.. – Hsn Jul 15 '19 at 12:47
  • if you wil have your script and folder web3 in the same folder then it should `import web3` without installation. – furas Jul 15 '19 at 12:49
  • here you can download `get-pip.py` and install `pip`: https://github.com/pypa/get-pip – furas Jul 15 '19 at 12:53
  • i have this missing package for get-pip.py ImportError: No module named pkgutil – Hsn Jul 15 '19 at 13:15
  • python setup.py install also gave me alot of error about missing libraries.. – Hsn Jul 15 '19 at 13:17
  • importing it from a same folder gave this error back.. ImportError: No module named 'eth_account' – Hsn Jul 15 '19 at 13:19

1 Answers1

1

You can just download the module (web3 folder from the repo), put it in your project directory and import it (so you can use it).

The problem is that the module can have some dependencies on other modules, so the problem is not resolved.

I think that the best solution for you is download and install pip from source.

lorenzo
  • 627
  • 8
  • 12