Pip install lseg-data gives error

ryan_choi
ryan_choi Newcomer
edited June 11 in Eikon Data APIs

When installing the lseg-data package on pip I get this error:

Collecting numpy~=1.11 (from lseg-data)
Using cached https://artifacts.jpmchase.net/artifactory/api/pypi/pypi/packages/numpy/1.26.4/numpy-1.26.4.tar.gz (15.8 MB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error

× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [21 lines of output]

  Build type: native build
Project name: NumPy
Project version: 1.26.4
WARNING: Failed to activate VS environment: Could not find C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe

I've done this in my own virtual environment and without one and I still get the same error. Any help is appreciated!

Answers

  • Hello @ryan_choi

    Your machine is unable to build NumPy because of missing dependencies. I would recommend that you start with a clean machine with the latest version of Python, pip, setuptools and wheel. You can also just try to install numpy first to isolate the issue. Numpy and SciPy modules need to be compiled on the target machine and they can fail, if the build tools are not in order.

    So try to get this working on your machine first -

    pip install numpy 
    
  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @ryan_choi

    What version of Python are you using?

    I use Python 3.12 and it works fine. Please try Python 3.12 instead.

    image.png
  • ryan_choi
    ryan_choi Newcomer

    I'm currently using python version 3.13, but I eventually solved this issue by download the lseg-data tar.gz file and manually installing it like that through pip.

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    Please make sure that all dependencies are correct.

    Requires-Dist: appdirs~=1.4.4
    Requires-Dist: pyee<=12,>=9.0.4
    Requires-Dist: httpx<0.28,>=0.18.0
    Requires-Dist: httpcore<1.1.0
    Requires-Dist: numpy
    Requires-Dist: pandas<3.0,>=2.0
    Requires-Dist: python-dateutil
    Requires-Dist: requests
    Requires-Dist: scipy
    Requires-Dist: tenacity
    Requires-Dist: watchdog
    Requires-Dist: websocket-client!=1.5.0,!=1.5.2,>=1.5
    Requires-Dist: pyhumps<4.0.0,>=3.0.2
    Requires-Dist: jinja2<4.0.0,>=3.0.3
    Requires-Dist: simplejson