Error When Trying to Install OpenN Package

This topic was automatically generated from Slack. You can find the original thread here.

tried to use openn package and got this error: Error
Command failed: python3 -m pip install --target=/tmp/pdg/dist/python -r requirements.txt --upgrade WARNING: The directory ‘/home/sbx_user1051/.cache/pip’ or its parent directory is not owned or is not writable by the current user. The cache has been disabled. Check the permissions and owner of that directory. If executing pip with sudo, you should use sudo’s -H flag. error: subprocess-exited-with-error × Building wheel for bt (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [16 lines of output] running bdist_wheel running build running build_py creating build creating build/lib.linux-x86_64-cpython-39 creating build/lib.linux-x86_64-cpython-39/bt copying bt/algos.py -> build/lib.linux-x86_64-cpython-39/bt copying bt/init.py -> build/lib.linux-x86_64-cpython-39/bt copying bt/core.py -> build/lib.linux-x86_64-cpython-39/bt copying bt/backtest.py -> build/lib.linux-x86_64-cpython-39/bt running build_ext building ‘bt.core’ extension creating build/temp.linux-x86_64-cpython-39 creating build/temp.linux-x86_64-cpython-39/bt gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/var/lang/include/python3.9 -c bt/core.c -o build/temp.linux-x86_64-cpython-39/bt/core.o error: command ‘gcc’ failed: No such file or directory [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for bt ERROR: Could not build wheels for bt, which is required to install pyproject.toml-based projects WARNING: You are using pip version 22.0.4; however, version 22.3.1 is available. You should consider upgrading via the ‘/var/lang/bin/python3 -m pip install --upgrade pip’ command.

Hi Ze, can you please provide the full contents of your Python code step?

very simple test:# pipedream add-package openbb

from openbb_terminal.sdk import openbb
spy_monthly = openbb.stocks.load(
symbol = ‘SPY’,
start_date = ‘1990-01-01’,
end_date = ‘’,
interval = 1440,
prepost = False,
source = ‘YahooFinance’,
weekly = False,
monthly = True,
)
spy_monthly.head(3)
return spy_monthly

Did you remove the def handler(pd): function too?

had not used it

That is problematic, but it’s unrelated to the package installation error.

I can reproduce with just installing the package:

# pipedream add-package openbb

def handler(pd: "pipedream"):
  # Reference data from previous steps
  print(pd.steps["trigger"]["context"]["id"])
  # Return data for use in future steps
  return {"foo": {"test":True}}

am trying with the def handler

oh strange, maybe due to timeout? it is a heavy package

It’s possible, starting a bug report for our engineering team to triage

Looks like the gcc binary is a requirement for this package:

command 'gcc' failed

is that a problem on pipedream? or we may find a solution?

It’s a dependency issue, this binary isn’t available in our workflow environment and this particular Python package relies on it.

The only other solution that doesn’t require a Pipedream system change is to find another implementation of this package that doesn’t rely on gcc

Here’s the bug card that you can subscribe to: [BUG] Python - gcc missing from environment, fails to import pip package · Issue #5326 · PipedreamHQ/pipedream · GitHub

thanks