Hi, I was trying to use the downsample_logging.py example, but I kept getting errors in python. I tried to install the dependencies and I believe the “joulescope” was the one that wasn’t working. It seemed the error had something to do with Visual Studio.
Can someone take a look at the error and tell me what steps I need to run to get the downsample_logging example working?
the downsample_logging error
PS C:\Users\test\Downloads\pyjoulescope_examples-main\pyjoulescope_examples-main> python .\bin\downsample_logging.py
Traceback (most recent call last):
File "C:\Users\test\Downloads\pyjoulescope_examples-main\pyjoulescope_examples-main\bin\downsample_logging.py", line 82, in <module>
from pyjoulescope_driver import Driver, time64
ModuleNotFoundError: No module named 'pyjoulescope_driver'
PS C:\Users\test\Downloads\pyjoulescope_examples-main\pyjoulescope_examples-main>
the pip install error
PS C:\Users\test\Downloads\pyjoulescope_examples-main\pyjoulescope_examples-main> pip3 install joulescope
Collecting joulescope
Using cached joulescope-1.1.15.tar.gz (893 kB)
Installing build dependencies ... error
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> [50 lines of output]
Collecting Cython
Using cached Cython-3.0.11-cp313-cp313-win_amd64.whl.metadata (3.2 kB)
Collecting numpy<2,>=1.23
Using cached numpy-1.26.4.tar.gz (15.8 MB)
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'
Installing backend dependencies: started
Installing backend dependencies: finished with status 'done'
Preparing metadata (pyproject.toml): started
Preparing metadata (pyproject.toml): finished with status 'error'
error: subprocess-exited-with-error
Preparing metadata (pyproject.toml) did not run successfully.
exit code: 1
[21 lines of output]
+ C:\Users\test\AppData\Local\Programs\Python\Python313\python.exe C:\Users\test\AppData\Local\Temp\pip-install-av31_qy5\numpy_9d908e1ec30c4a8d972a2ff08bf02699\vendored-meson\meson\meson.py setup C:\Users\test\AppData\Local\Temp\pip-install-av31_qy5\numpy_9d908e1ec30c4a8d972a2ff08bf02699 C:\Users\test\AppData\Local\Temp\pip-install-av31_qy5\numpy_9d908e1ec30c4a8d972a2ff08bf02699\.mesonpy-cfgfd4rj -Dbuildtype=release -Db_ndebug=if-release -Db_vscrt=md --native-file=C:\Users\test\AppData\Local\Temp\pip-install-av31_qy5\numpy_9d908e1ec30c4a8d972a2ff08bf02699\.mesonpy-cfgfd4rj\meson-python-native-file.ini
The Meson build system
Version: 1.2.99
Source dir: C:\Users\test\AppData\Local\Temp\pip-install-av31_qy5\numpy_9d908e1ec30c4a8d972a2ff08bf02699
Build dir: C:\Users\test\AppData\Local\Temp\pip-install-av31_qy5\numpy_9d908e1ec30c4a8d972a2ff08bf02699\.mesonpy-cfgfd4rj
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] The system cannot find the file specified"
Running `cl /?` gave "[WinError 2] The system cannot find the file specified"
Running `cc --version` gave "[WinError 2] The system cannot find the file specified"
Running `gcc --version` gave "[WinError 2] The system cannot find the file specified"
Running `clang --version` gave "[WinError 2] The system cannot find the file specified"
Running `clang-cl /?` gave "[WinError 2] The system cannot find the file specified"
Running `pgcc --version` gave "[WinError 2] The system cannot find the file specified"
A full log can be found at C:\Users\test\AppData\Local\Temp\pip-install-av31_qy5\numpy_9d908e1ec30c4a8d972a2ff08bf02699\.mesonpy-cfgfd4rj\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.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip
error: subprocess-exited-with-error
× pip subprocess to install build dependencies did not run successfully.
│ exit code: 1
╰─> See above for output.
note: This error originates from a subprocess, and is likely not a problem with pip.
PS C:\Users\test\Downloads\pyjoulescope_examples-main\pyjoulescope_examples-main> pip install --only-binary :all: joulescope
ERROR: Could not find a version that satisfies the requirement joulescope (from versions: none)
[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip
ERROR: No matching distribution found for joulescope
PS C:\Users\test\Downloads\pyjoulescope_examples-main\pyjoulescope_examples-main> pip install --only-binary joulescope
[notice] A new release of pip is available: 24.2 -> 24.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip
ERROR: You must give at least one requirement to install (see "pip help install")
PS C:\Users\test\Downloads\pyjoulescope_examples-main\pyjoulescope_examples-main>