Python and uplink_python

I’ve installed uplink-python ( option 1) GitHub - storj-thirdparty/uplink-python: Python bindings for libuplink
but in this case the pycharm prefers the system Python over a virtual environment
PyCharm unresolves reference on import “from uplink_python.uplink import Uplink”
with my venv
Creating a new project with system python ( no venv) reference is solved
This is not related to storj but if somenone want to share his experience I’d really appreciate it

Thank you

on pip list in venv the package is listed

You could use VS Code instead of pycharm.
I find PyCharm cumbersome at times.

1 Like

Hi Sunday, and welcome!

I wonder if your problem does not come from pycharm library path. Could you check if the path where libuplinkc is is referenced in the pycharm external libraries path? (Python Interpreters | PyCharm)

Install virtual enviroment

ツ~/test ☛ python3 -m venv uplink

Activate virtual

ツ~/test ☛ source uplink/bin/activate

Install uplink-python python package

(uplink) ツ~/test ☛ pip install uplink-python

Compile Uplink module (option 2)

GitHub - storj-thirdparty/uplink-python: Python bindings for libuplink

(uplink) ツ~/test ☛ git clone -b v1.2.2

Compile uplink module

cd uplink

(uplink) ツ~/test/uplink-c ☛ go build -o -buildmode=c-shared

Copy module in python site-packages folder

(uplink) ツ~/test/uplink-c ☛ cp ~/test/uplink/lib/python3.9/site-packages/uplink_python/

Same here , but solved with Option 2 and check your Copy “” mudule in /site-packages/uplink_python/ and not in site-packages

1 Like