question

Upvotes
1 0 1 1

Hello, I need help installing lseg python library

You'll find below the error message generated. It seems there is a problem with Numpy dependency. The version of Numpy is 2.1.2 .

----------------------------------------------------

PS C:\Users\VVMD250\OneDrive - LA POSTE GROUPE\PYTHON> pip install lseg-data

Requirement already satisfied: lseg-data in c:\users\vvmd250\appdata\local\programs\python\python313\lib\site-packages (2.0.0)

Collecting appdirs~=1.4.4 (from lseg-data)

Using cached appdirs-1.4.4-py2.py3-none-any.whl.metadata (9.0 kB)

Collecting pyee<=11.1.0,>=9.0.4 (from lseg-data)

Using cached pyee-11.1.0-py3-none-any.whl.metadata (2.8 kB)

Collecting httpx<0.27.0,>=0.18.0 (from lseg-data)

Using cached httpx-0.26.0-py3-none-any.whl.metadata (7.6 kB)

Collecting httpcore<1.1.0 (from lseg-data)

Using cached httpcore-1.0.6-py3-none-any.whl.metadata (21 kB)

Collecting numpy~=1.11 (from lseg-data)

Using cached 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]

+ C:\Users\VVMD250\AppData\Local\Programs\Python\Python313\python.exe C:\Users\VVMD250\AppData\Local\Temp\pip-install-lrt1g0vb\numpy_fbc4ac54da0e4ffea961a3b75906ea05\vendored-meson\meson\meson.py setup C:\Users\VVMD250\AppData\Local\Temp\pip-install-lrt1g0vb\numpy_fbc4ac54da0e4ffea961a3b75906ea05 C:\Users\VVMD250\AppData\Local\Temp\pip-install-lrt1g0vb\numpy_fbc4ac54da0e4ffea961a3b75906ea05\.mesonpy-wf4x7hyg -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\VVMD250\AppData\Local\Temp\pip-install-lrt1g0vb\numpy_fbc4ac54da0e4ffea961a3b75906ea05\.mesonpy-wf4x7hyg\meson-python-native-file.ini

The Meson build system

Version: 1.2.99

Source dir: C:\Users\VVMD250\AppData\Local\Temp\pip-install-lrt1g0vb\numpy_fbc4ac54da0e4ffea961a3b75906ea05

Build dir: C:\Users\VVMD250\AppData\Local\Temp\pip-install-lrt1g0vb\numpy_fbc4ac54da0e4ffea961a3b75906ea05\.mesonpy-wf4x7hyg

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


..\meson.build:1:0: ERROR: Unknown compiler(s): [['icl'], ['cl'], ['cc'], ['gcc'], ['clang'], ['clang-cl'], ['pgcc']]

The following exception(s) were encountered:

Running `icl ""` gave "[WinError 2] Le fichier spécifié est introuvable"

Running `cl /?` gave "[WinError 2] Le fichier spécifié est introuvable"

Running `cc --version` gave "[WinError 2] Le fichier spécifié est introuvable"

Running `gcc --version` gave "[WinError 2] Le fichier spécifié est introuvable"

Running `clang --version` gave "[WinError 2] Le fichier spécifié est introuvable"

Running `clang-cl /?` gave "[WinError 2] Le fichier spécifié est introuvable"

Running `pgcc --version` gave "[WinError 2] Le fichier spécifié est introuvable"


A full log can be found at C:\Users\VVMD250\AppData\Local\Temp\pip-install-lrt1g0vb\numpy_fbc4ac54da0e4ffea961a3b75906ea05\.mesonpy-wf4x7hyg\meson-logs\meson-log.txt

[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.

PS C:\Users\VVMD250\OneDrive - LA POSTE GROUPE\PYTHON>

Best regards

#productpython apilseg-data-library
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
7.4k 18 2 8

Hi @julien.lebon-lafond01 ,


Lseg data will try to install numpy version of 1.25.2. Please try installing that version of numpy manually before running pip install lseg.data.


Best regards,

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
28k 68 18 14

Hello @julien.lebon-lafond01

I suggest you use the Python version 3.10 (download here) and use the Python virtual environment to avoid the library version conflict as mentioned by my colleague above.

You can create a new Python environment, then install and use the LSEG Data Library in that environment, so the installed libraries will not conflict with your main Python installation.

This is the result from my Python 3.10.15 virtual environment:

(test_lseg) C:\Users\UserA>pip install lseg-data
Collecting lseg-data
  Using cached lseg_data-2.0.0-py3-none-any.whl.metadata (10 kB)
Collecting appdirs~=1.4.4 (from lseg-data)
  Using cached appdirs-1.4.4-py2.py3-none-any.whl.metadata (9.0 kB)
Collecting pyee<=11.1.0,>=9.0.4 (from lseg-data)
  Using cached pyee-11.1.0-py3-none-any.whl.metadata (2.8 kB)
Collecting httpx<0.27.0,>=0.18.0 (from lseg-data)
  Using cached httpx-0.26.0-py3-none-any.whl.metadata (7.6 kB)
Collecting httpcore<1.1.0 (from lseg-data)
  Using cached httpcore-1.0.6-py3-none-any.whl.metadata (21 kB)
Collecting numpy~=1.11 (from lseg-data)
  Using cached numpy-1.26.4-cp310-cp310-win_amd64.whl.metadata (61 kB)
....
Using cached exceptiongroup-1.2.2-py3-none-any.whl (16 kB)
Installing collected packages: pytz, pyhumps, appdirs, websocket-client, watchdog, urllib3, tzdata, typing-extensions, tenacity, sniffio, six, simplejson, numpy, MarkupSafe, idna, h11, exceptiongroup, charset-normalizer, certifi, scipy, requests, python-dateutil, pyee, jinja2, httpcore, anyio, pandas, httpx, lseg-data
Successfully installed MarkupSafe-3.0.2 anyio-4.6.2.post1 appdirs-1.4.4 certifi-2024.8.30 charset-normalizer-3.4.0 exceptiongroup-1.2.2 h11-0.14.0 httpcore-1.0.6 httpx-0.26.0 idna-3.10 jinja2-3.1.4 lseg-data-2.0.0 numpy-1.26.4 pandas-2.2.3 pyee-11.1.0 pyhumps-3.8.0 python-dateutil-2.9.0.post0 pytz-2024.2 requests-2.32.3 scipy-1.12.0 simplejson-3.19.3 six-1.16.0 sniffio-1.3.1 tenacity-8.5.0 typing-extensions-4.12.2 tzdata-2024.2 urllib3-2.2.3 watchdog-2.3.1 websocket-client-1.8.0


(test_lseg) C:\Users\UserA>
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvotes
87.5k 294 53 79

@julien.lebon-lafond01

You may try to use the following command.

pip install --no-cache-dir lseg-data
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.