Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will not install. Tried multiple methods and multiple pi's and multiple pi os versions. #132

Open
cjo40 opened this issue Apr 21, 2024 · 7 comments
Assignees
Labels
documentation Improvements or additions to documentation

Comments

@cjo40
Copy link

cjo40 commented Apr 21, 2024

Will not install. Tried "one-line" and " Install and configure" and neither works on rpi4 on bullseye or bookworm. Bash and directions need updated.

@Gadgetoid
Copy link
Member

Oof, I missed updating the readme. Yes install should be:

git clone https://github.com/pimoroni/enviroplus-python
cd enviroplus-python
./install.sh

@Gadgetoid Gadgetoid self-assigned this Apr 22, 2024
@Gadgetoid Gadgetoid added the documentation Improvements or additions to documentation label Apr 22, 2024
@cjo40
Copy link
Author

cjo40 commented Apr 23, 2024

cjo40@raspberrypi:~/enviroplus-python $ ./install.sh
Installing enviroplus...

This script should be run in a virtual Python environment.
Would you like us to create and/or use a default one? [y/N] y

Creating a new virtual Python environment in /home/cjo40/.virtualenvs/pimoroni, please wait...

Checking for /home/cjo40/Pimoroni/auto_venv.sh

Creating /home/cjo40/Pimoroni/auto_venv.sh


Checking Dependencies. Please wait...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: toml in /usr/lib/python3/dist-packages (0.10.1)
Collecting toml
  Downloading https://www.piwheels.org/simple/toml/toml-0.10.2-py2.py3-none-any.whl (16 kB)
Installing collected packages: toml
  Attempting uninstall: toml
    Found existing installation: toml 0.10.1
    Not uninstalling toml at /usr/lib/python3/dist-packages, outside environment /home/cjo40/.virtualenvs/pimoroni
    Can't uninstall 'toml'. No files were found to uninstall.
Successfully installed toml-0.10.2

Installing for Python 3.9.2...

Checking for python3
Checking for python3-pip
Checking for python3-cffi
Checking for libportaudio2

Installing missing packages: python3-cffi libportaudio2
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following package was automatically installed and is no longer required:
  libfuse2
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  python3-ply python3-pycparser
Suggested packages:
  python-ply-doc
The following NEW packages will be installed:
  libportaudio2 python3-cffi python3-ply python3-pycparser
0 upgraded, 4 newly installed, 0 to remove and 21 not upgraded.
Need to get 289 kB of archives.
After this operation, 1,475 kB of additional disk space will be used.
Get:1 http://deb.debian.org/debian bullseye/main arm64 libportaudio2 arm64 19.6.0-1.1 [61.3 kB]
Get:2 http://deb.debian.org/debian bullseye/main arm64 python3-ply all 3.11-4 [65.5 kB]
Get:3 http://deb.debian.org/debian bullseye/main arm64 python3-pycparser all 2.20-3 [74.5 kB]
Get:4 http://deb.debian.org/debian bullseye/main arm64 python3-cffi all 1.14.5-1 [87.9 kB]
Fetched 289 kB in 0s (2,338 kB/s)  
Selecting previously unselected package libportaudio2:arm64.
(Reading database ... 157535 files and directories currently installed.)
Preparing to unpack .../libportaudio2_19.6.0-1.1_arm64.deb ...
Unpacking libportaudio2:arm64 (19.6.0-1.1) ...
Selecting previously unselected package python3-ply.
Preparing to unpack .../python3-ply_3.11-4_all.deb ...
Unpacking python3-ply (3.11-4) ...
Selecting previously unselected package python3-pycparser.
Preparing to unpack .../python3-pycparser_2.20-3_all.deb ...
Unpacking python3-pycparser (2.20-3) ...
Selecting previously unselected package python3-cffi.
Preparing to unpack .../python3-cffi_1.14.5-1_all.deb ...
Unpacking python3-cffi (1.14.5-1) ...
Setting up libportaudio2:arm64 (19.6.0-1.1) ...
Setting up python3-ply (3.11-4) ...
Setting up python3-pycparser (2.20-3) ...
Setting up python3-cffi (1.14.5-1) ...
Processing triggers for libc-bin (2.31-13+rpt2+rpi1+deb11u8) ...
Processing triggers for man-db (2.9.4-2) ...

Installing stable library from pypi.

Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting enviroplus
  Downloading https://www.piwheels.org/simple/enviroplus/enviroplus-1.0.1-py3-none-any.whl (10 kB)
Collecting ltr559>=1.0.0
  Downloading https://www.piwheels.org/simple/ltr559/ltr559-1.0.0-py3-none-any.whl (10 kB)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/gpiodevice/
Collecting gpiodevice>=0.0.3
  Downloading https://www.piwheels.org/simple/gpiodevice/gpiodevice-0.0.3-py3-none-any.whl (9.0 kB)
Collecting pms5003>=1.0.0
  Downloading https://www.piwheels.org/simple/pms5003/pms5003-1.0.0-py3-none-any.whl (7.1 kB)
Collecting pytz
  Downloading https://www.piwheels.org/simple/pytz/pytz-2024.1-py3-none-any.whl (505 kB)
     |████████████████████████████████| 505 kB 241 kB/s 
Collecting pimoroni-bme280>=1.0.0
  Downloading https://www.piwheels.org/simple/pimoroni-bme280/pimoroni_bme280-1.0.0-py3-none-any.whl (7.8 kB)
Collecting fonts
  Downloading https://www.piwheels.org/simple/fonts/fonts-0.0.3-py3-none-any.whl (4.2 kB)
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))': /simple/paho-mqtt/
Collecting paho-mqtt
  Downloading https://www.piwheels.org/simple/paho-mqtt/paho_mqtt-2.0.0-py3-none-any.whl (66 kB)
     |████████████████████████████████| 66 kB 229 kB/s 
Collecting astral
  Downloading https://www.piwheels.org/simple/astral/astral-3.2-py3-none-any.whl (38 kB)
Collecting ads1015>=1.0.0
  Downloading https://www.piwheels.org/simple/ads1015/ads1015-1.0.0-py3-none-any.whl (9.0 kB)
Collecting gpiod>=2.1.3
  Downloading gpiod-2.1.3.tar.gz (53 kB)
     |████████████████████████████████| 53 kB 707 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /home/cjo40/.virtualenvs/pimoroni/bin/python /tmp/tmppdyio_9u_in_process.py get_requires_for_build_wheel /tmp/tmpyqw_awlm
       cwd: /tmp/pip-install-y_jt1z1u/gpiod_bad9d2ac15544157b473cb860398aa1d
  Complete output (18 lines):
  Traceback (most recent call last):
    File "/tmp/tmppdyio_9u_in_process.py", line 280, in <module>
      main()
    File "/tmp/tmppdyio_9u_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/tmp/tmppdyio_9u_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 149, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 130, in _get_build_requires
      self.run_setup()
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 253, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 145, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 11, in <module>
      from setuptools.errors import BaseError
  ImportError: cannot import name 'BaseError' from 'setuptools.errors' (/usr/lib/python3/dist-packages/setuptools/errors.py)
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/a8/56/730573fe8d03c4d32a31e7182d27317b0cef298c9170b5a2994e2248986f/gpiod-2.1.3.tar.gz#sha256=a33193d6cab79d252329f71666a35a3668e04f1f82bf9b93ee2c9ae852398b20 (from https://pypi.org/simple/gpiod/) (requires-python:>=3.9.0). Command errored out with exit status 1: /home/cjo40/.virtualenvs/pimoroni/bin/python /tmp/tmppdyio_9u_in_process.py get_requires_for_build_wheel /tmp/tmpyqw_awlm Check the logs for full command output.
Collecting enviroplus
  Downloading https://www.piwheels.org/simple/enviroplus/enviroplus-0.0.6-py3-none-any.whl (6.5 kB)
Collecting st7735
  Downloading https://www.piwheels.org/simple/st7735/st7735-1.0.0-py3-none-any.whl (11 kB)
Collecting font-roboto
  Downloading https://www.piwheels.org/simple/font-roboto/font_roboto-0.0.1-py3-none-any.whl (2.4 MB)
     |████████████████████████████████| 2.4 MB 434 kB/s 
Collecting sounddevice
  Downloading https://www.piwheels.org/simple/sounddevice/sounddevice-0.4.6-py3-none-any.whl (31 kB)
Collecting i2cdevice>=1.0.0
  Downloading https://www.piwheels.org/simple/i2cdevice/i2cdevice-1.0.0-py3-none-any.whl (10 kB)
Collecting smbus2
  Downloading https://www.piwheels.org/simple/smbus2/smbus2-0.4.3-py2.py3-none-any.whl (11 kB)
Requirement already satisfied: pyserial in /usr/lib/python3/dist-packages (from pms5003>=1.0.0->enviroplus) (3.5b0)
Collecting gpiod
  Downloading gpiod-2.1.2.tar.gz (52 kB)
     |████████████████████████████████| 52 kB 273 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /home/cjo40/.virtualenvs/pimoroni/bin/python /tmp/tmpufeqcwcl_in_process.py get_requires_for_build_wheel /tmp/tmpa0dtv5_m
       cwd: /tmp/pip-install-y_jt1z1u/gpiod_aad1b6b205ff4d7bbf8a303dad2d2f7f
  Complete output (18 lines):
  Traceback (most recent call last):
    File "/tmp/tmpufeqcwcl_in_process.py", line 280, in <module>
      main()
    File "/tmp/tmpufeqcwcl_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/tmp/tmpufeqcwcl_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 149, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 130, in _get_build_requires
      self.run_setup()
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 253, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 145, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 11, in <module>
      from setuptools.errors import BaseError
  ImportError: cannot import name 'BaseError' from 'setuptools.errors' (/usr/lib/python3/dist-packages/setuptools/errors.py)
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/06/04/42110105df1cb3f025702d1d66c8f508eff0a396e0e730fa27461d700830/gpiod-2.1.2.tar.gz#sha256=06aa84ab0063b55ba7c941fa3592be2acfa68cf8665fef7571130218b5f299e1 (from https://pypi.org/simple/gpiod/) (requires-python:>=3.9.0). Command errored out with exit status 1: /home/cjo40/.virtualenvs/pimoroni/bin/python /tmp/tmpufeqcwcl_in_process.py get_requires_for_build_wheel /tmp/tmpa0dtv5_m Check the logs for full command output.
  Downloading gpiod-2.1.1.tar.gz (52 kB)
     |████████████████████████████████| 52 kB 348 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /home/cjo40/.virtualenvs/pimoroni/bin/python /tmp/tmp24z0r04h_in_process.py get_requires_for_build_wheel /tmp/tmpnkdcz5z5
       cwd: /tmp/pip-install-y_jt1z1u/gpiod_4ef0096574a84b71b7a597cb54e2903f
  Complete output (18 lines):
  Traceback (most recent call last):
    File "/tmp/tmp24z0r04h_in_process.py", line 280, in <module>
      main()
    File "/tmp/tmp24z0r04h_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/tmp/tmp24z0r04h_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 149, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 130, in _get_build_requires
      self.run_setup()
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 253, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 145, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 11, in <module>
      from setuptools.errors import BaseError
  ImportError: cannot import name 'BaseError' from 'setuptools.errors' (/usr/lib/python3/dist-packages/setuptools/errors.py)
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/d0/7c/332540ce8620e9219a89a16e8141dba308bdb523cd07e1af008d84c226c5/gpiod-2.1.1.tar.gz#sha256=97cae3380f1f47eca19c8b8748bd6f1b9e8bd1dba621258e3183501b07aa644e (from https://pypi.org/simple/gpiod/) (requires-python:>=3.9.0). Command errored out with exit status 1: /home/cjo40/.virtualenvs/pimoroni/bin/python /tmp/tmp24z0r04h_in_process.py get_requires_for_build_wheel /tmp/tmpnkdcz5z5 Check the logs for full command output.
  Downloading gpiod-2.1.0.tar.gz (52 kB)
     |████████████████████████████████| 52 kB 412 kB/s 
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  ERROR: Command errored out with exit status 1:
   command: /home/cjo40/.virtualenvs/pimoroni/bin/python /tmp/tmpys1qll_r_in_process.py get_requires_for_build_wheel /tmp/tmpdsmcrxbd
       cwd: /tmp/pip-install-y_jt1z1u/gpiod_7f5f9b88a7b5414187875647709fb29e
  Complete output (18 lines):
  Traceback (most recent call last):
    File "/tmp/tmpys1qll_r_in_process.py", line 280, in <module>
      main()
    File "/tmp/tmpys1qll_r_in_process.py", line 263, in main
      json_out['return_val'] = hook(**hook_input['kwargs'])
    File "/tmp/tmpys1qll_r_in_process.py", line 114, in get_requires_for_build_wheel
      return hook(config_settings)
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 149, in get_requires_for_build_wheel
      return self._get_build_requires(
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 130, in _get_build_requires
      self.run_setup()
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 253, in run_setup
      super(_BuildMetaLegacyBackend,
    File "/usr/lib/python3/dist-packages/setuptools/build_meta.py", line 145, in run_setup
      exec(compile(code, __file__, 'exec'), locals())
    File "setup.py", line 11, in <module>
      from setuptools.errors import BaseError
  ImportError: cannot import name 'BaseError' from 'setuptools.errors' (/usr/lib/python3/dist-packages/setuptools/errors.py)
  ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/72/6e/67c6d09f2947a56007faa41c5c15bc86af585b28e46d52f0952811b873b4/gpiod-2.1.0.tar.gz#sha256=607738ca78942d85a99392fa579930d1dc364e925eece11ce84bad9c7ba5903b (from https://pypi.org/simple/gpiod/) (requires-python:>=3.9.0). Command errored out with exit status 1: /home/cjo40/.virtualenvs/pimoroni/bin/python /tmp/tmpys1qll_r_in_process.py get_requires_for_build_wheel /tmp/tmpdsmcrxbd Check the logs for full command output.
  Downloading https://www.piwheels.org/simple/gpiod/gpiod-1.5.4-py3-none-any.whl (30 kB)
Requirement already satisfied: CFFI>=1.0 in /usr/lib/python3/dist-packages (from sounddevice->enviroplus) (1.14.5)
Requirement already satisfied: spidev>=3.4 in /usr/lib/python3/dist-packages (from st7735->enviroplus) (3.5)
Requirement already satisfied: numpy in /usr/lib/python3/dist-packages (from st7735->enviroplus) (1.19.5)
Installing collected packages: smbus2, gpiod, i2cdevice, gpiodevice, st7735, sounddevice, pytz, pms5003, pimoroni-bme280, paho-mqtt, ltr559, fonts, font-roboto, astral, ads1015, enviroplus
Successfully installed ads1015-1.0.0 astral-3.2 enviroplus-0.0.6 font-roboto-0.0.1 fonts-0.0.3 gpiod-1.5.4 gpiodevice-0.0.3 i2cdevice-1.0.0 ltr559-1.0.0 paho-mqtt-2.0.0 pimoroni-bme280-1.0.0 pms5003-1.0.0 pytz-2024.1 smbus2-0.4.3 sounddevice-0.4.6 st7735-1.0.0
Done!

Using config.txt in /boot

Running setup commands...

Setting up i2c and SPI..
Backing up /boot/config.txt to /boot/config.preinstall-enviroplus-2024-04-22-19-00-57.txt

Running: "sudo raspi-config nonint do_spi 0"
Running: "sudo raspi-config nonint do_i2c 0"
Setting up serial for PMS5003..
Running: "sudo raspi-config nonint do_serial_cons 1"
/usr/bin/raspi-config: 2909: do_serial_cons: not found
⚠ WARNING: ^^^ 😬 previous command did not exit cleanly!
Running: "sudo raspi-config nonint do_serial_hw 1"
/usr/bin/raspi-config: 2909: do_serial_hw: not found
⚠ WARNING: ^^^ 😬 previous command did not exit cleanly!

Adding dtoverlay=pi3-miniuart-bt to /boot/config.txt
dtoverlay=pi3-miniuart-bt 
Adding dtoverlay=adau7002-simple to /boot/config.txt
dtoverlay=adau7002-simple 

@cjo40
Copy link
Author

cjo40 commented Apr 23, 2024

Several errors during $ ./install.sh and none of the examples will work.

@Gadgetoid
Copy link
Member

Ooof, 100% of that wall of error seems to be related to gpiod builds. Though it appears to have been successfully installed anyway.

What's happening when you run the examples?

Note, you'll get dumped out of the virtualenv when the install finishes. To run the examples you'll need to:

source ~/.virtualenvs/pimoroni/bin/activate

I, uh, should probably document this somewhere!

It also helps if you:

sudo apt install python3-virtualenvwrapper virtualenvwrapper

Since then you can use the workon command to list envs and switch, eg to list:

phil@pi5-nvme:~ $ workon
decky
dev
lgpio
nvme
pimoroni
poetry

to switch:

phil@pi5-nvme:~ $ workon pimoroni
(pimoroni) phil@pi5-nvme:~ $

This is all assuming the virtual environment warts are the problem.

Gadgetoid added a commit that referenced this issue Apr 23, 2024
Update install instructions for #132
@helgibbons
Copy link
Contributor

The installation instructions on Learn are now up to date: https://learn.pimoroni.com/article/getting-started-with-enviro-plus

@Get-Kraken
Copy link

The installation instructions on Learn are now up to date: https://learn.pimoroni.com/article/getting-started-with-enviro-plus

Is this valid for the non plus version of the board? the enviro mini

@helgibbons
Copy link
Contributor

Is this valid for the non plus version of the board? the enviro mini

This one?

Yes! Both boards use the same installer (though you won't be able to run the examples that use the gas sensor or the particulate sensor on the non-plus version).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

4 participants