solana-py icon indicating copy to clipboard operation
solana-py copied to clipboard

Need help upgrading solana-py

Open TradeUpCards opened this issue 2 years ago • 1 comments

Hi all,

I'm doing my best to get started with doing some analytical work on transactional data. My biggest frustration with learning web3 dev stuff so far has been getting the setup for doing work. It's been down right infuriating at times. I went through this a few months ago and at one point had multiple versions of python and still couldn't get it. I'm trying again after a hiatus from baby #3.

I know there are other ways to pull solana transactions, but I'm trying to kill two birds since learning Python would potentially help at work as well.

Anyway, I'm on a machine with:

Windows 11 VS Code Ubuntu 18.04.6 LTS Linux version: 5.10.16.3-microsoft-standard-WSL2 python3.8 solana.py version 0.1.1 pip version 23.2.1

When I do pip install --upgrade solana

it errors out `tradeup@MSI:~/dev/python/crossmint$ pip install --upgrade solana Defaulting to user installation because normal site-packages is not writeable Requirement already satisfied: solana in /usr/local/lib/python3.8/site-packages (0.1.1) Collecting solana Obtaining dependency information for solana from https://files.pythonhosted.org/packages/1c/ac/500682e3a69278e3b5c6539de3a5ba61ddab793346aac5ef09c55fbf39cd/solana-0.30.2-py3-none-any.whl.metadata Using cached solana-0.30.2-py3-none-any.whl.metadata (5.2 kB) Collecting cachetools<5.0.0,>=4.2.2 (from solana) Using cached cachetools-4.2.4-py3-none-any.whl (10 kB) Collecting construct-typing<0.6.0,>=0.5.2 (from solana) Using cached construct_typing-0.5.6-py3-none-any.whl (24 kB) Collecting httpx<0.24.0,>=0.23.0 (from solana) Using cached httpx-0.23.3-py3-none-any.whl (71 kB) Collecting solders<0.19.0,>=0.18.0 (from solana) Obtaining dependency information for solders<0.19.0,>=0.18.0 from https://files.pythonhosted.org/packages/8b/3d/242cbe61fbf8a3781a226c3d2f3d483227c76ae4f41d86342cf855795f5b/solders-0.18.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata Using cached solders-0.18.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (3.8 kB) Collecting types-cachetools<5.0.0,>=4.2.4 (from solana) Using cached types_cachetools-4.2.10-py3-none-any.whl (4.8 kB) Requirement already satisfied: typing-extensions>=4.2.0 in /home/tradeup/.local/lib/python3.8/site-packages (from solana) (4.5.0) Collecting websockets<12.0,>=9.0 (from solana) Using cached websockets-11.0.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (130 kB) Collecting construct==2.10.68 (from construct-typing<0.6.0,>=0.5.2->solana) Using cached construct-2.10.68.tar.gz (57 kB) Preparing metadata (setup.py) ... done Requirement already satisfied: certifi in /home/tradeup/.local/lib/python3.8/site-packages (from httpx<0.24.0,>=0.23.0->solana) (2022.12.7) Collecting httpcore<0.17.0,>=0.15.0 (from httpx<0.24.0,>=0.23.0->solana) Using cached httpcore-0.16.3-py3-none-any.whl (69 kB) Collecting rfc3986[idna2008]<2,>=1.3 (from httpx<0.24.0,>=0.23.0->solana) Using cached rfc3986-1.5.0-py2.py3-none-any.whl (31 kB) Collecting sniffio (from httpx<0.24.0,>=0.23.0->solana) Using cached sniffio-1.3.0-py3-none-any.whl (10 kB) Collecting jsonalias==0.1.1 (from solders<0.19.0,>=0.18.0->solana) Using cached jsonalias-0.1.1-py3-none-any.whl (1.3 kB) Collecting h11<0.15,>=0.13 (from httpcore<0.17.0,>=0.15.0->httpx<0.24.0,>=0.23.0->solana) Using cached h11-0.14.0-py3-none-any.whl (58 kB) Collecting anyio<5.0,>=3.0 (from httpcore<0.17.0,>=0.15.0->httpx<0.24.0,>=0.23.0->solana) Obtaining dependency information for anyio<5.0,>=3.0 from https://files.pythonhosted.org/packages/36/55/ad4de788d84a630656ece71059665e01ca793c04294c463fd84132f40fe6/anyio-4.0.0-py3-none-any.whl.metadata Downloading anyio-4.0.0-py3-none-any.whl.metadata (4.5 kB) Requirement already satisfied: idna in /home/tradeup/.local/lib/python3.8/site-packages (from rfc3986[idna2008]<2,>=1.3->httpx<0.24.0,>=0.23.0->solana) (3.4) Collecting exceptiongroup>=1.0.2 (from anyio<5.0,>=3.0->httpcore<0.17.0,>=0.15.0->httpx<0.24.0,>=0.23.0->solana) Obtaining dependency information for exceptiongroup>=1.0.2 from https://files.pythonhosted.org/packages/ad/83/b71e58666f156a39fb29417e4c8ca4bc7400c0dd4ed9e8842ab54dc8c344/exceptiongroup-1.1.3-py3-none-any.whl.metadata Using cached exceptiongroup-1.1.3-py3-none-any.whl.metadata (6.1 kB) Using cached solana-0.30.2-py3-none-any.whl (66 kB) Using cached solders-0.18.1-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.9 MB) Downloading anyio-4.0.0-py3-none-any.whl (83 kB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 83.1/83.1 kB 1.3 MB/s eta 0:00:00 Using cached exceptiongroup-1.1.3-py3-none-any.whl (14 kB) Building wheels for collected packages: construct Building wheel for construct (setup.py) ... error error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [34 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "/tmp/pip-install-mcor27p1/construct_46bac369a9f346228736cc5e3df6ab58/setup.py", line 5, in setup( File "/home/tradeup/.local/lib/python3.8/site-packages/setuptools/init.py", line 107, in setup return distutils.core.setup(**attrs) File "/home/tradeup/.local/lib/python3.8/site-packages/setuptools/_distutils/core.py", line 172, in setup ok = dist.parse_command_line() File "/home/tradeup/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 475, in parse_command_line args = self._parse_command_opts(parser, args) File "/home/tradeup/.local/lib/python3.8/site-packages/setuptools/dist.py", line 1142, in _parse_command_opts nargs = _Distribution._parse_command_opts(self, parser, args) File "/home/tradeup/.local/lib/python3.8/site-packages/setuptools/_distutils/dist.py", line 534, in _parse_command_opts cmd_class = self.get_command_class(command) File "/home/tradeup/.local/lib/python3.8/site-packages/setuptools/dist.py", line 989, in get_command_class self.cmdclass[command] = cmdclass = ep.load() File "/home/tradeup/.local/lib/python3.8/site-packages/setuptools/_vendor/importlib_metadata/init.py", line 208, in load module = import_module(match.group('module')) File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 975, in _find_and_load_unlocked File "", line 671, in _load_unlocked File "", line 843, in exec_module File "", line 219, in _call_with_frames_removed File "/home/tradeup/.local/lib/python3.8/site-packages/wheel/bdist_wheel.py", line 28, in from .macosx_libfile import calculate_macosx_platform_tag File "/home/tradeup/.local/lib/python3.8/site-packages/wheel/macosx_libfile.py", line 43, in import ctypes File "/usr/local/lib/python3.8/ctypes/init.py", line 7, in from _ctypes import Union, Structure, Array ModuleNotFoundError: No module named '_ctypes' [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for construct Running setup.py clean for construct Failed to build construct ERROR: Could not build wheels for construct, which is required to install pyproject.toml-based projects`

I just want to be able to run code without being told I'm using old/depricated methods and actually be productive. If i need to nuke python and start over again, I'm willing to do that. Any time and help anyone can provide would be greatly appreciated. I'm reaching out in my small networks and someone suggested posting an issue here as well.

Regards, TradeUp

TradeUpCards avatar Aug 31 '23 00:08 TradeUpCards

Please reference https://kevinheavey.github.io/solders/ for missing modules

michaelhly avatar Dec 30 '23 23:12 michaelhly