Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Installing bt (0.2.9): Failed EnvCommandError #1600

Closed
vitlyent099 opened this issue Mar 31, 2022 · 2 comments · Fixed by #1601
Closed

Installing bt (0.2.9): Failed EnvCommandError #1600

vitlyent099 opened this issue Mar 31, 2022 · 2 comments · Fixed by #1601
Assignees
Labels
bug Fix bug

Comments

@vitlyent099
Copy link

  • System: Windows 10 - WSL Linux
    Error Output:

    • Installing bt (0.2.9): Failed

    EnvCommandError

  Command ['/home/debian/miniconda3/envs/gst/bin/pip', 'install', '--no-deps', '/home/debian/.cache/pypoetry/artifacts/5c/9e/93/4c82e89772295e13aa891374cd331bd7d096e4d28dfb0da07abd5f7ed4/bt-0.2.9.tar.gz'] errored with the following return code 1, and output:
  Processing /home/debian/.cache/pypoetry/artifacts/5c/9e/93/4c82e89772295e13aa891374cd331bd7d096e4d28dfb0da07abd5f7ed4/bt-0.2.9.tar.gz
    Installing build dependencies: started
    Installing build dependencies: finished with status 'done'
    Getting requirements to build wheel: started
    Getting requirements to build wheel: finished with status 'done'
    Preparing metadata (pyproject.toml): started
    Preparing metadata (pyproject.toml): finished with status 'done'
  Building wheels for collected packages: bt
    Building wheel for bt (pyproject.toml): started
    Building wheel for bt (pyproject.toml): finished with status 'error'
    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-3.8
        creating build/lib.linux-x86_64-3.8/bt
        copying bt/algos.py -> build/lib.linux-x86_64-3.8/bt
        copying bt/backtest.py -> build/lib.linux-x86_64-3.8/bt
        copying bt/core.py -> build/lib.linux-x86_64-3.8/bt
        copying bt/__init__.py -> build/lib.linux-x86_64-3.8/bt
        running build_ext
        building 'bt.core' extension
        creating build/temp.linux-x86_64-3.8
        creating build/temp.linux-x86_64-3.8/bt
        gcc -pthread -B /home/debian/miniconda3/envs/gst/compiler_compat -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /home/debian/miniconda3/envs/gst/include -fPIC -O2 -isystem /home/debian/miniconda3/envs/gst/include -fPIC -I/home/debian/miniconda3/envs/gst/include/python3.8 -c bt/core.c -o build/temp.linux-x86_64-3.8/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
  Failed to build bt
  ERROR: Could not build wheels for bt, which is required to install pyproject.toml-based projects


  at ~/miniconda3/envs/gst/lib/python3.8/site-packages/poetry/utils/env.py:1183 in _run
      1179│                 output = subprocess.check_output(
      1180│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1181│                 )
      1182│         except CalledProcessError as e:
    → 1183│             raise EnvCommandError(e, input=input_)
      1184│
      1185│         return decode(output)
      1186│
      1187│     def execute(self, bin, *args, **kwargs):

Troubleshooting steps taken

  • Removed .cache/artifacts folder
  • Ran poetry install (displayed error)
  • Ran poetry update --lock (displayed error)
  • Tried to uninstall the package via conda and pip package not found on both commands

When running terminal.py this is the other error

 Traceback (most recent call last):
  File "terminal.py", line 842, in <module>
    main(
  File "terminal.py", line 784, in main
    terminal()
  File "terminal.py", line 453, in terminal
    setup_logging(appName)
  File "/home/debian/OpenBBTerminal/openbb_terminal/loggers.py", line 165, in setup_logging
    commit_hash = get_commit_hash()
  File "/home/debian/OpenBBTerminal/openbb_terminal/loggers.py", line 80, in get_commit_hash
    repo = git.Repo(search_parent_directories=True)
NameError: name 'git' is not defined
@vitlyent099
Copy link
Author

Got it to work on Ubuntu using WSL instead of Debian, although the bt package still fails to install

@piiq
Copy link
Contributor

piiq commented Mar 31, 2022

Can you try installing git into the wsl os you use with apt install git?

@Chavithra Chavithra self-assigned this Mar 31, 2022
@Chavithra Chavithra added the bug Fix bug label Mar 31, 2022
@Chavithra Chavithra mentioned this issue Mar 31, 2022
8 tasks
Chavithra added a commit that referenced this issue Mar 31, 2022
* Fix 1600

* Revert file

* Linting

* Linting
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fix bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants