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

error installing on Windows 11, Python 3.9 #671

Open
mtbjonny opened this issue Jan 4, 2023 · 3 comments
Open

error installing on Windows 11, Python 3.9 #671

mtbjonny opened this issue Jan 4, 2023 · 3 comments

Comments

@mtbjonny
Copy link

mtbjonny commented Jan 4, 2023

Cannot install in Windows 11, Python 3.9 (or later). Tried multiple PCs. Same error - Freetype and PNG cannot be built.

My understanding is that this package is supported by 3.9? Fairly new at installing python packages, so do please excuse me if there's an obvious answer here..

Error copied below:
PS C:\Users\mtbjo\AppData\Local\Programs\Python\Python39\Scripts> ./pip install alpaca-backtrader-api
Collecting alpaca-backtrader-api
Downloading alpaca_backtrader_api-0.15.0-py3-none-any.whl (23 kB)
Collecting pandas==1.3.2
Downloading pandas-1.3.2-cp39-cp39-win_amd64.whl (10.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.2/10.2 MB 11.4 MB/s eta 0:00:00
Collecting matplotlib==2.2.5
Downloading matplotlib-2.2.5.tar.gz (36.7 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 36.7/36.7 MB 10.2 MB/s eta 0:00:00
Preparing metadata (setup.py) ... error
error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [61 lines of output]
============================================================================
Edit setup.cfg to change the build options

  BUILDING MATPLOTLIB
              matplotlib: yes [2.2.5]
                  python: yes [3.9.9 (tags/v3.9.9:ccb0e6a, Nov 15 2021,
                          18:08:50) [MSC v.1929 64 bit (AMD64)]]
                platform: yes [win32]

  REQUIRED DEPENDENCIES AND EXTENSIONS
                   numpy: yes [version 1.22.2]
        install_requires: yes [handled by setuptools]
                  libagg: yes [pkg-config information for 'libagg' could not
                          be found. Using local copy.]
                freetype: no  [The C/C++ header for freetype
                          (freetype2\ft2build.h) could not be found.  You may
                          need to install the development package.]
                     png: no  [The C/C++ header for png (png.h) could not be
                          found.  You may need to install the development
                          package.]
                   qhull: yes [pkg-config information for 'libqhull' could not
                          be found. Using local copy.]

  OPTIONAL SUBPACKAGES
             sample_data: yes [installing]
                toolkits: yes [installing]
                   tests: no  [skipping due to configuration]
          toolkits_tests: no  [skipping due to configuration]

  OPTIONAL BACKEND EXTENSIONS
                  macosx: no  [Mac OS-X only]
                  qt5agg: no  [PySide2 not found; PyQt5 not found]
                  qt4agg: no  [PySide not found; PyQt4 not found]
                 gtk3agg: no  [Requires pygobject to be installed.]
               gtk3cairo: no  [Requires cairocffi or pycairo to be installed.]
                  gtkagg: no  [Requires pygtk]
                   tkagg: yes [installing; run-time loading from Python Tcl /
                          Tk]
                   wxagg: no  [requires wxPython]
                     gtk: no  [Requires pygtk]
                     agg: yes [installing]
                   cairo: no  [cairocffi or pycairo not found]
               windowing: yes [installing]

  OPTIONAL LATEX DEPENDENCIES
                  dvipng: no
             ghostscript: no
                   latex: no
                 pdftops: no

  OPTIONAL PACKAGE DATA
                    dlls: no  [skipping due to configuration]

  ============================================================================
                          * The following required packages can not be built:
                          * freetype, png
                          * Please check http://gnuwin32.sourceforge.net/packa
                          * ges/freetype.htm for instructions to install
                          * freetype
                          * Please check http://gnuwin32.sourceforge.net/packa
                          * ges/libpng.htm for instructions to install png
  [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

@swapnillondhe24
Copy link

have you found solution i am facing same problem and after trying everything on StackOverflow still it is not resolved

@mtbjonny
Copy link
Author

Hi there, Unfortunately, no. At this point, I'm having to work around the issue by not using this....

@holicst
Copy link

holicst commented Jan 26, 2024

I also have the same issue. Why is matplotlib needed anyway for trading on Alpaca?

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

No branches or pull requests

3 participants