0

I have developed some python code on Windows 3.9.0 environment. I run pip freeze prog.py > requirements.txt. I then tried to re-create a similar environment on my RaspberryPi running Python v3.7.3.
However, sudo pip install -r requirements.txt is always failing to install the pyobject.

I manually tried to explicitly install this specific module, but it is continually failing.

pi@raspberrypi:~/operational_report $ sudo pip install pyobject
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting pyobject
  Using cached pyobject-1.0.tar.gz (12 kB)
    ERROR: Command errored out with exit status 1:
     command: /usr/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-f845qmhj/pyobject_5cd636e5023149cdad8facedb280eced/setup.py'"'"'; __file__='"'"'/tmp/pip-install-f845qmhj/pyobject_5cd636e5023149cdad8facedb280eced/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 /tmp/pip-pip-egg-info-dxk1_umj
         cwd: /tmp/pip-install-f845qmhj/pyobject_5cd636e5023149cdad8facedb280eced/
    Complete output (7 lines):
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/tmp/pip-install-f845qmhj/pyobject_5cd636e5023149cdad8facedb280eced/setup.py", line 8, in <module>
        long_desc=open("README.rst").read()
      File "/usr/lib/python3.7/codecs.py", line 322, in decode
        (result, consumed) = self._buffer_decode(data, self.errors, final)
    UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb8 in position 13: invalid start byte
    ----------------------------------------
WARNING: Discarding https://files.pythonhosted.org/packages/bb/e2/2fc82c012dbcbb3f817e3469076d801597221e031c3055cc0d53d199a6c8/pyobject-1.0.tar.gz#sha256=365215501067aff41db991561f98f0d28c410fbc870e531615c07b7168f36b6a (from https://pypi.org/simple/pyobject/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement pyobject
ERROR: No matching distribution found for pyobject

Do you have any advice?

apaderno
  • 28,547
  • 16
  • 75
  • 90
  • First, pyobject has two versions 1.0 and 1.1. Is there a reason you're using 1.0 only? Second, I tried to look at the pypi project page (https://pypi.org/project/pyobject/) and it does not say which versions of python it is compatible with. Given that it was developed in 2020, it's likely that they did not test it for 3.7.x. – astrochun Feb 19 '21 at 12:49
  • Transpires that this module was not required in the program - so that problem has effectively "gone away"! – Derin Mellor Feb 19 '21 at 15:20

0 Answers0