jetperch / joulescope_driver

User-space C driver for Joulescope™ products

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

setup.py imports numpy - install fails on clean system

lglenat opened this issue · comments

Hello, I believe this is the same issue as jetperch/pyjoulescope#6 but for the pyjoulescope-driver package.
This makes the installation fail on a clean system.
The same fix could probably be used.
Thanks!

Hi @lglenat and thanks for the report.

I am definitely not up to speed on the new build & install process:

  • PEP 517 – A build-system independent format for source trees
  • PEP 518 – Specifying Minimum Build System Requirements for Python Projects
  • PEP 621 – Storing project metadata in pyproject.toml

However, I just tried this on Windows with the latest pyjoulescope_driver 1.3.6 wheel, and it seems to work:

PS C:\Users\mliberty> python -m venv c:\venv\test && C:\venv\test\Scripts\Activate.ps1
(test) PS C:\Users\mliberty> pip install -U pyjoulescope_driver
Collecting pyjoulescope_driver
  Using cached pyjoulescope_driver-1.3.6-cp311-cp311-win_amd64.whl (2.2 MB)
Collecting numpy>=1.23
  Using cached numpy-1.24.3-cp311-cp311-win_amd64.whl (14.8 MB)
Collecting requests
  Using cached requests-2.29.0-py3-none-any.whl (62 kB)
Collecting pywin32
  Using cached pywin32-306-cp311-cp311-win_amd64.whl (9.2 MB)
Collecting charset-normalizer<4,>=2
  Using cached charset_normalizer-3.1.0-cp311-cp311-win_amd64.whl (96 kB)
Collecting idna<4,>=2.5
  Using cached idna-3.4-py3-none-any.whl (61 kB)
Collecting urllib3<1.27,>=1.21.1
  Using cached urllib3-1.26.15-py2.py3-none-any.whl (140 kB)
Collecting certifi>=2017.4.17
  Using cached certifi-2022.12.7-py3-none-any.whl (155 kB)
Installing collected packages: pywin32, urllib3, numpy, idna, charset-normalizer, certifi, requests, pyjoulescope_driver
Successfully installed certifi-2022.12.7 charset-normalizer-3.1.0 idna-3.4 numpy-1.24.3 pyjoulescope_driver-1.3.6 pywin32-306 requests-2.29.0 urllib3-1.26.15

[notice] A new release of pip available: 22.3.1 -> 23.1.2
[notice] To update, run: python.exe -m pip install --upgrade pip
(test) PS C:\Users\mliberty>

Questions:

  1. Are you trying to install using pip install pyjoulescope_driver?
  2. What OS are you using?

Hi and thanks for your quick response!
I'm installing it via pipenv, with pyjoulescope-driver in my Pipfile.
The OS is Ubuntu 22.04.
I'm doing this in a fresh Docker container and a bare python 3.9.13 installation (with no additional packages installed).

I just tried this on Windows with the latest pyjoulescope_driver 1.3.6 wheel, and it seems to work

If you uninstall it, and also uninstall numpy, does the installation work?

If you uninstall it, and also uninstall numpy, does the installation work?

My example used a fresh virtual environment. The output shows that pip install pyjoulescope_driver installed numpy, so it got the dependency from the setup.py "install_requires" as it should. However, on Windows we are installing a wheel. On Linux, the install must do both build and install.

I just tried this on Ubuntu 22.04, and it works, too:

python3 -m venv ./venv/test
. ./venv/test/bin/activate
pip3 install pyjoulescope_driver

I am not familiar with pipenv. Can you provide a Pipfile and commands so that I can duplicate this issue?

Hi @mliberty1 - turns out I cannot reproduce the issue anymore. I've re-run the install via pipenv multiple times in fresh docker containers and things work properly every time.
Not sure what the original issue was :(, sorry for the waste of time. I'm going to close this issue and re-open if we ever run into problems again.
Thanks for your help!

Great to hear that things are working for you! We still definitely have work remaining to improve the build & install process. This issue was reported yesterday, which may be related.