Closed mliberty1 closed 4 years ago
The setup.py script imports numpy which prevents joulescope from installing on clean systems. To duplicate (macOS Mojave 10.14.5):
virtualenv {path} . {path}/bin/activate pip3 install -U --no-cache-dir joulescope
Gives
(joulescope) achilles:pyjoulescope_ui mliberty$ pip3 install -U --no-cache-dir joulescope Collecting joulescope Downloading https://files.pythonhosted.org/packages/96/b2/71fce72803278ea0d5a5cc2a1db4ede3521028051acce8976d98923951b7/joulescope-0.5.0.tar.gz (221kB) |████████████████████████████████| 225kB 2.4MB/s ERROR: Command errored out with exit status 1: command: /Users/mliberty/venv/joulescope/bin/python3.7 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/st/whvm6q5976g4w_c0bgk7y3kw0000gn/T/pip-install-_sdtu87a/joulescope/setup.py'"'"'; __file__='"'"'/private/var/folders/st/whvm6q5976g4w_c0bgk7y3kw0000gn/T/pip-install-_sdtu87a/joulescope/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base pip-egg-info cwd: /private/var/folders/st/whvm6q5976g4w_c0bgk7y3kw0000gn/T/pip-install-_sdtu87a/joulescope/ Complete output (5 lines): Traceback (most recent call last): File "<string>", line 1, in <module> File "/private/var/folders/st/whvm6q5976g4w_c0bgk7y3kw0000gn/T/pip-install-_sdtu87a/joulescope/setup.py", line 27, in <module> import numpy as np ModuleNotFoundError: No module named 'numpy' ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
Manually installing numpy fixes:
(joulescope) achilles:pyjoulescope_ui mliberty$ pip3 install numpy Collecting numpy Using cached https://files.pythonhosted.org/packages/c1/4b/78119133136c20e5ad2e01bf72b0633241defd619939908223cd394a9c32/numpy-1.17.0-cp37-cp37m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl Installing collected packages: numpy Successfully installed numpy-1.17.0 (joulescope) achilles:pyjoulescope_ui mliberty$ pip3 install -U --no-cache-dir joulescope Collecting joulescope Downloading https://files.pythonhosted.org/packages/96/b2/71fce72803278ea0d5a5cc2a1db4ede3521028051acce8976d98923951b7/joulescope-0.5.0.tar.gz (221kB) |████████████████████████████████| 225kB 2.2MB/s Requirement already satisfied, skipping upgrade: numpy>=1.15.2 in /Users/mliberty/venv/joulescope/lib/python3.7/site-packages (from joulescope) (1.17.0) Collecting python-dateutil>=2.7.3 (from joulescope) Downloading https://files.pythonhosted.org/packages/41/17/c62faccbfbd163c7f57f3844689e3a78bae1f403648a6afb1d0866d87fbb/python_dateutil-2.8.0-py2.py3-none-any.whl (226kB) |████████████████████████████████| 235kB 7.4MB/s Collecting pymonocypher>=0.1.0 (from joulescope) Downloading https://files.pythonhosted.org/packages/81/45/1a558416525fd741a03a21135172e2b5bf67388591d201a1d0ebe532beba/pymonocypher-0.1.2.tar.gz (87kB) |████████████████████████████████| 92kB 12.4MB/s Collecting six>=1.5 (from python-dateutil>=2.7.3->joulescope) Downloading https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl Building wheels for collected packages: joulescope, pymonocypher Building wheel for joulescope (setup.py) ... done Created wheel for joulescope: filename=joulescope-0.5.0-cp37-cp37m-macosx_10_14_x86_64.whl size=225944 sha256=cc0f00e8330c9f55eef794ce73d4b4b697314f80f03647d52b202945e2f55f36 Stored in directory: /private/var/folders/st/whvm6q5976g4w_c0bgk7y3kw0000gn/T/pip-ephem-wheel-cache-_1l1lsz_/wheels/97/b5/37/848c3664182e79753af6ff5f0c1141a355b3acfaaa72c4ee77 Building wheel for pymonocypher (setup.py) ... done Created wheel for pymonocypher: filename=pymonocypher-0.1.2-cp37-cp37m-macosx_10_14_x86_64.whl size=84885 sha256=ca1725165e44d11ca7a685f0b40c943b47f3c08ea8b791a2523c84680549f82c Stored in directory: /private/var/folders/st/whvm6q5976g4w_c0bgk7y3kw0000gn/T/pip-ephem-wheel-cache-_1l1lsz_/wheels/ba/d8/b4/2065735e6856e3d2ec731ae92957d8ed32ca556ff06dff1900 Successfully built joulescope pymonocypher Installing collected packages: six, python-dateutil, pymonocypher, joulescope Successfully installed joulescope-0.5.0 pymonocypher-0.1.2 python-dateutil-2.8.0 six-1.12.0 (joulescope) achilles:pyjoulescope_ui mliberty$
I have hit this. Seems kinda like a chicken and the egg problem.
Fixed in https://github.com/jetperch/pyjoulescope/commit/30705a6ee3c17748fff0acf9f919c31c6f4abd50
The setup.py script imports numpy which prevents joulescope from installing on clean systems. To duplicate (macOS Mojave 10.14.5):
Gives
Manually installing numpy fixes: