Open k3fjeee opened 1 month ago
Can you run pip show solana
? What does it output?
Can you run
pip show solana
? What does it output?
same, my pip show solana
result this:
Name: solana Version: 0.30.2 Summary: Solana Python API Home-page: https://github.com/michaelhly/solanapy Author: Michael Huang Author-email: michaelhly@gmail.com License: MIT Location: /Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages Requires: cachetools, construct-typing, httpx, solders, types-cachetools, typing-extensions, websockets Required-by:
@joshephan would you mind updating to the latest and see if that issue still occurs?
@joshephan would you mind updating to the latest and see if that issue still occurs?
I've been tried multiple times to upgrade version, it's not working for me. Even if I install newest version of python 3.12.4. So I continued to check the problem and found that in the Mac environment I use, the Python file is called via python3, so I set alias python = python3
in .bash_profile and ran pip install --upgarde
, and only then did the upgrade proceed.
The issue of not being detected after a version upgrade has now been resolved.
import asyncio from solana.rpc.async_api import AsyncClient
async def main(): async with AsyncClient("https://api.devnet.solana.com") as client: res = await client.is_connected() print(res) # True
asyncio.run(main())
ModuleNotFoundError: No module named 'solana.rpc.async_api'