sdispater / pendulum

Python datetimes made easy
https://pendulum.eustace.io
MIT License
6.21k stars 386 forks source link

pip install pendulum fails on raspbery pi 4 (arm7) #504

Open Fabs opened 3 years ago

Fabs commented 3 years ago

Issue

Can't install it on raspbery pi 4.

(venv) pi@pi:~/lunos/samurai $ uname -a
Linux pi 5.4.51-v7l+ #1333 SMP Mon Aug 10 16:51:40 BST 2020 armv7l GNU/Linux
(venv) pi@pi:~/lunos/samurai $ python --version
Python 3.7.3
(venv) pi@pi:~/lunos/samurai $ pip --version
pip 18.1 from /home/pi/lunos/samurai/venv/lib/python3.7/site-packages/pip (python 3.7)
(venv) pi@pi:~/lunos/samurai $ pip install pendulum
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pendulum
  Using cached https://files.pythonhosted.org/packages/db/15/6e89ae7cde7907118769ed3d2481566d05b5fd362724025198bb95faf599/pendulum-2.1.2.tar.gz
  Installing build dependencies ... done
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-1d2npdqh/pendulum/setup.py'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-1d2npdqh/pendulum/
ner0tic commented 3 years ago

I also encountered this problem.

 $ uname -a
Linux powerPi 4.19.75-v7+ #1270 SMP Tue Sep 24 18:45:11 BST 2019 armv7l GNU/Linux
$ python3 -m pip --version
pip 20.2.4 from /home/pi/.local/lib/python3.7/site-packages/pip (python 3.7)
 $ python3 --version
Python 3.7.3
$ sudo python3 -m pip install pendulum
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pendulum
  Using cached https://files.pythonhosted.org/packages/db/15/6e89ae7cde7907118769ed3d2481566d05b5fd362724025198bb95faf599/pendulum-2.1.2.tar.gz
  Installing build dependencies ... done
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-i7fjc_45/pendulum/setup.py'

    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-i7fjc_45/pendulum/

My current installation workaround.

$ sudo python3 -m pip install pendulum==2.1.1
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pendulum==2.1.1
  Downloading https://files.pythonhosted.org/packages/9a/0d/e503011d347e2d41f4fb05c6b3d7fbfcc8b2c25baba13e1804597e7d2412/pendulum-2.1.1.tar.gz (84kB)
    100% |ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ| 92kB 297kB/s 
  Installing build dependencies ... done
Collecting python-dateutil<3.0,>=2.6 (from pendulum==2.1.1)
  Downloading https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227kB)
    100% |ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ| 235kB 285kB/s 
Collecting pytzdata>=2020.1 (from pendulum==2.1.1)
  Downloading https://files.pythonhosted.org/packages/e0/4f/4474bda990ee740a020cbc3eb271925ef7daa7c8444240d34ff62c8442a3/pytzdata-2020.1-py2.py3-none-any.whl (489kB)
    100% |ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ| 491kB 210kB/s 
Requirement already satisfied: six>=1.5 in /usr/lib/python3/dist-packages (from python-dateutil<3.0,>=2.6->pendulum==2.1.1) (1.12.0)
Building wheels for collected packages: pendulum
  Running setup.py bdist_wheel for pendulum ... done
  Stored in directory: /root/.cache/pip/wheels/f4/11/39/94053df467afd002cf669ac033b9cc1f1f33e6f4e97a02475c
Successfully built pendulum
Installing collected packages: python-dateutil, pytzdata, pendulum
Successfully installed pendulum-2.1.1 python-dateutil-2.8.1 pytzdata-2020.1

$ python3 -m pip install pendulum --upgrade
Defaulting to user installation because normal site-packages is not writeable
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pendulum
  Downloading https://www.piwheels.org/simple/pendulum/pendulum-2.1.2-cp37-cp37m-manylinux2014_armv7l.whl (168 kB)
     |ā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆā–ˆ| 168 kB 106 kB/s 
Requirement already satisfied, skipping upgrade: pytzdata>=2020.1 in /usr/local/lib/python3.7/dist-packages (from pendulum) (2020.1)
Requirement already satisfied, skipping upgrade: python-dateutil<3.0,>=2.6 in /usr/local/lib/python3.7/dist-packages (from pendulum) (2.8.1)
Requirement already satisfied, skipping upgrade: six>=1.5 in /home/pi/.local/lib/python3.7/site-packages (from python-dateutil<3.0,>=2.6->pendulum) (1.15.0)
Installing collected packages: pendulum
Successfully installed pendulum-2.1.2
mghurd commented 3 years ago

This workaround is not working for me.

~# python3 -m pip install pendulum --upgrade Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple Collecting pendulum Using cached https://files.pythonhosted.org/packages/db/15/6e89ae7cde7907118769ed3d2481566d05b5fd362724025198bb95faf599/pendulum-2.1.2.tar.gz Installing build dependencies ... done Complete output from command python setup.py egg_info: Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.7/tokenize.py", line 447, in open buffer = _builtin_open(filename, 'rb') FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-b7gqf5ij/pendulum/setup.py'

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

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-b7gqf5ij/pendulum/

mghurd commented 3 years ago

OK. Had to upgrade my pip3 and could then manually download the whl file and performed the upgrade.

irdroid3 commented 3 years ago

I have just had this on a RPi Zero. (OS and not RPi4 related then...) :

$ pip3 install pendulum
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pendulum
  Using cached https://files.pythonhosted.org/packages/db/15/6e89ae7cde7907118769ed3d2481566d05b5fd362724025198bb95faf599/pendulum-2.1.2.tar.gz`
`  Installing build dependencies ... done`
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-hpo82ats/pendulum/setup.py'

I also got around this with : sudo python3 -m pip install pendulum==2.1.1

It appears that the file downloaded for v2.1.2 - https://files.pythonhosted.org/packages/db/15/6e89ae7cde7907118769ed3d2481566d05b5fd362724025198bb95faf599/pendulum-2.1.2.tar.gz - Is MISSING the setup.py file, where as v2.1.1 - https://files.pythonhosted.org/packages/9a/0d/e503011d347e2d41f4fb05c6b3d7fbfcc8b2c25baba13e1804597e7d2412/pendulum-2.1.1.tar.gz - HAS a setup.py file. SO, is this a package build problem in v2.1.2 ?

Regards, Ian .

RemBrandNL commented 3 years ago

Setting up a clean install on a RPI 0 based on 2021-01-11-raspios-buster-armhf-lite.zip. Ran into this issue running sudo pip3 install results. Just being new, I was happy that @ner0tic 's work-around works like a charm, thanks! Remco

fransimo commented 3 years ago

For me pip install -U pip worked fine (on a virtual env)

jeremyehack commented 3 years ago

Also had this issue on a Raspberry pi 3b+ running 5.10.17-v7+

The 2.1.2 build was failing so I specified 2.1.1. in my requirements.txt and the pi installed it just fine. Seems like an issue with the setup.py file for this version. Not sure what about the issue is specific to the pi OS.

2.1.2

 Installing build dependencies ... done
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-0h4qvms8/pendulum/setup.py'

2.1.1

Building wheels for collected packages: pendulum
  Running setup.py bdist_wheel for pendulum ... error
  Complete output from command /home/.../venv/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-install-mlhoxes9/pendulum/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/pip-wheel-2gp8i9o8 --python-tag cp37:
  usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: -c --help [cmd1 cmd2 ...]
     or: -c --help-commands
     or: -c cmd --help

  error: invalid command 'bdist_wheel'

  ----------------------------------------
  Failed building wheel for pendulum
  Running setup.py clean for pendulum
Failed to build pendulum
Installing collected packages: pytzdata, pendulum
  Running setup.py install for pendulum ... done
kimaero commented 3 years ago

Same here. 2.1.1 was successfully installed while 2.1.2 gave the same errors as people higher in the thread was having

AetherUnbound commented 2 years ago

It seems like this is also showing up on the Apple M1 computers since that's also ARM-based. The manylinux wheel appears to have the setup.py file present for v2.1.2.

spacemanspiff2007 commented 2 years ago

Installation still fails on a raspberry pi:

Collecting pendulum==2.1.2 (from habapp)
  Using cached https://files.pythonhosted.org/packages/db/15/6e89ae7cde7907118769ed3d2481566d05b5fd362724025198bb95faf599/pendulum-2.1.2.tar.gz
  Installing build dependencies ... done
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/usr/lib/python3.7/tokenize.py", line 447, in open
        buffer = _builtin_open(filename, 'rb')
    FileNotFoundError: [Errno 2] No such file or directory: '/tmp/pip-install-lscf1s_f/pendulum/setup.py'
spacemanspiff2007 commented 2 years ago

@sdispater I created a small python application that allows you to create home automation rules in python. I've shared it, so other people can use it too and don't have to start from scratch. However 95% of my support questions in the forum have been about the failing installation of pendulum and the real frustrating part is not the amount of cries for help but that I can't properly help since the workarounds above work for some people and for some they just fail.

Could you please fix the setup issues? A simple fix could be to just include a setup.py until it's clear why the installation is failing.

niwla23 commented 2 years ago

@sdispater I created a small python application that allows you to create home automation rules in python. I've shared it, so other people can use it too and don't have to start from scratch. However 95% of my support questions in the forum have been about the failing installation of pendulum and the real frustrating part is not the amount of cries for help but that I can't properly help since the workarounds above work for some people and for some they just fail.

Could you please fix the setup issues? A simple fix could be to just include a setup.py until it's clear why the installation is failing.

@spacemanspiff2007

I am trying to install HABApp rn too. The workarround works for me but the version is fixed so it tries to install a broken version.

spacemanspiff2007 commented 2 years ago

The workarround works for me but the version is fixed so it tries to install a broken version.

What do you mean?