storj-thirdparty / uplink-python

Python bindings for libuplink
https://storj.io
Apache License 2.0
21 stars 10 forks source link

Installation error in Option #2 #17

Closed pickaxe828 closed 3 years ago

pickaxe828 commented 3 years ago

When I from uplink_python.uplink import Uplink, it throws an error:

Traceback (most recent call last):
  File "d:\path\storj_test1.py", line 11, in <module>
    uplink = Uplink()
  File "C:\Users\user\AppData\Local\Programs\Python\Python39\lib\site-packages\uplink_python\uplink.py", line 50, in __init__
    raise LibUplinkSoError
uplink_python.errors.LibUplinkSoError: 'libuplinkc.so not found'

I guess it's because of libuplinkc.so fails to build using Option 1, and I tried to follow the steps in Option 2 to create the .so file. Although I've installed GO, it stills seems like it's missing some variable/ envvar/ argument:

D:\prefered-path\uplink-c>go build -o libuplinkc.so -buildmode=c-shared
# runtime/cgo
cgo: exec gcc: exec: "gcc": executable file not found in %PATH%

How should I fix that? Or it's because of the pip install? I cannot install the latest version 1.2.2.0 of the library, it automatically installed 1.1.0.1 for me. (Windows 10.0.19043.1083)

kmozurkewich commented 3 years ago

Hi @pickaxe828 -

In the notes we have for Windows:

On Windows

    Install Visual C++ Build Environment: Visual Studio Build Tools (using "Visual C++ build tools" workload) or Visual Studio 2017 Community (using the "Desktop development with C++" workload)
    Make sure you have access to site-packages folder inside the directory where Python is installed. To do this navigate to the directory where Python is installed, if you get an error "Permission Denied", follow the instruction in the message box and allow access using security tab.
    Install appropriate GCC compiler (for example TDM-GCC). Make sure g++ listed in PATH.

Can you confirm you have those requirements met?

pickaxe828 commented 3 years ago

Hi @pickaxe828 -

In the notes we have for Windows:

On Windows

    Install Visual C++ Build Environment: Visual Studio Build Tools (using "Visual C++ build tools" workload) or Visual Studio 2017 Community (using the "Desktop development with C++" workload)
    Make sure you have access to site-packages folder inside the directory where Python is installed. To do this navigate to the directory where Python is installed, if you get an error "Permission Denied", follow the instruction in the message box and allow access using security tab.
    Install appropriate GCC compiler (for example TDM-GCC). Make sure g++ listed in PATH.

Can you confirm you have those requirements met?

Oh I didn't installed the TDM-GCC because the install exe keep saying I have to install the latest one. However, it works! Thx for your help :>