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

Dapr lab only install without errors on Python 3.9 but no such information is given #76

Open
Jackenmen opened this issue Apr 30, 2022 · 1 comment

Comments

@Jackenmen
Copy link
Contributor

Jackenmen commented Apr 30, 2022

This issue is for a: (mark with an x)

- [ ] bug report -> please search issues before submitting
- [ ] feature request
- [x] documentation issue or request
- [ ] regression (a behavior that used to work and stopped in a new release)

Minimal steps to reproduce

Run these commands on Ubuntu 20.04:

git clone https://github.com/Azure-Samples/azure-python-labs.git
cd azure-python-labs/01-dapr
python3 -m venv env
source env/bin/activate
pip install -r requirements.txt

Any log messages given by the failure

This is output on Python 3.8 (not entirely sure that this actually failed but there are error messages here that I did not see on Python 3.9):

Python 3.8 output
❯ pip install -r requirements.txt
Collecting aiohttp==3.7.4.post0
  Using cached aiohttp-3.7.4.post0-cp38-cp38-manylinux2014_x86_64.whl (1.5 MB)
Collecting async-timeout==3.0.1
  Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting attrs==20.3.0
  Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting certifi==2020.12.5
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting dapr==1.1.0
  Downloading dapr-1.1.0-py3-none-any.whl (70 kB)
     |████████████████████████████████| 70 kB 1.2 MB/s 
Collecting fire==0.4.0
  Downloading fire-0.4.0.tar.gz (87 kB)
     |████████████████████████████████| 87 kB 3.0 MB/s 
Collecting grpcio==1.37.1
  Downloading grpcio-1.37.1-cp38-cp38-manylinux2014_x86_64.whl (4.2 MB)
     |████████████████████████████████| 4.2 MB 2.7 MB/s 
Collecting idna==2.10
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting multidict==5.1.0
  Using cached multidict-5.1.0-cp38-cp38-manylinux2014_x86_64.whl (159 kB)
Collecting protobuf==3.13.0
  Downloading protobuf-3.13.0-cp38-cp38-manylinux1_x86_64.whl (1.3 MB)
     |████████████████████████████████| 1.3 MB 4.7 MB/s 
Collecting python-dateutil==2.8.1
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting requests==2.25.1
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting six==1.15.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting termcolor==1.1.0
  Downloading termcolor-1.1.0.tar.gz (3.9 kB)
Collecting typing-extensions==3.7.4.3
  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting urllib3==1.26.3
  Using cached urllib3-1.26.3-py2.py3-none-any.whl (137 kB)
Collecting yarl==1.6.3
  Using cached yarl-1.6.3-cp38-cp38-manylinux2014_x86_64.whl (324 kB)
Requirement already satisfied: setuptools in ./env/lib/python3.8/site-packages (from protobuf==3.13.0->-r requirements.txt (line 11)) (44.0.0)
Building wheels for collected packages: fire, termcolor
  Building wheel for fire (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/jack/work/azure-python-labs/01-dapr/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fpjko75m/fire/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fpjko75m/fire/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-qj7_nfe6
       cwd: /tmp/pip-install-fpjko75m/fire/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for fire
  Running setup.py clean for fire
  Building wheel for termcolor (setup.py) ... error
  ERROR: Command errored out with exit status 1:
   command: /home/jack/work/azure-python-labs/01-dapr/env/bin/python3 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-fpjko75m/termcolor/setup.py'"'"'; __file__='"'"'/tmp/pip-install-fpjko75m/termcolor/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-wommazse
       cwd: /tmp/pip-install-fpjko75m/termcolor/
  Complete output (6 lines):
  usage: setup.py [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
     or: setup.py --help [cmd1 cmd2 ...]
     or: setup.py --help-commands
     or: setup.py cmd --help
  
  error: invalid command 'bdist_wheel'
  ----------------------------------------
  ERROR: Failed building wheel for termcolor
  Running setup.py clean for termcolor
Failed to build fire termcolor
Installing collected packages: async-timeout, chardet, attrs, multidict, typing-extensions, idna, yarl, aiohttp, certifi, six, grpcio, protobuf, python-dateutil, dapr, termcolor, fire, urllib3, requests
    Running setup.py install for termcolor ... done
    Running setup.py install for fire ... done
Successfully installed aiohttp-3.7.4.post0 async-timeout-3.0.1 attrs-20.3.0 certifi-2020.12.5 chardet-3.0.4 dapr-1.1.0 fire-0.4.0 grpcio-1.37.1 idna-2.10 multidict-5.1.0 protobuf-3.13.0 python-dateutil-2.8.1 requests-2.25.1 six-1.15.0 termcolor-1.1.0 typing-extensions-3.7.4.3 urllib3-1.26.3 yarl-1.6.3

Python 3.10 output:

Python 3.10 output
❯ pip install -r requirements.txt
Collecting aiohttp==3.7.4.post0
  Downloading aiohttp-3.7.4.post0.tar.gz (1.1 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 4.2 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting async-timeout==3.0.1
  Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting attrs==20.3.0
  Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting certifi==2020.12.5
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting dapr==1.1.0
  Using cached dapr-1.1.0-py3-none-any.whl (70 kB)
Collecting fire==0.4.0
  Using cached fire-0.4.0.tar.gz (87 kB)
  Preparing metadata (setup.py) ... done
Collecting grpcio==1.37.1
  Downloading grpcio-1.37.1.tar.gz (21.7 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 21.7/21.7 MB 4.9 MB/s eta 0:00:00
  Preparing metadata (setup.py) ... done
Collecting idna==2.10
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting multidict==5.1.0
  Downloading multidict-5.1.0.tar.gz (53 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 53.7/53.7 KB 6.6 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Collecting protobuf==3.13.0
  Downloading protobuf-3.13.0-py2.py3-none-any.whl (438 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 438.4/438.4 KB 41.8 MB/s eta 0:00:00
Collecting python-dateutil==2.8.1
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting requests==2.25.1
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting six==1.15.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting termcolor==1.1.0
  Using cached termcolor-1.1.0.tar.gz (3.9 kB)
  Preparing metadata (setup.py) ... done
Collecting typing-extensions==3.7.4.3
  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting urllib3==1.26.3
  Using cached urllib3-1.26.3-py2.py3-none-any.whl (137 kB)
Collecting yarl==1.6.3
  Downloading yarl-1.6.3.tar.gz (176 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 176.8/176.8 KB 16.3 MB/s eta 0:00:00
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: setuptools in ./env/lib/python3.10/site-packages (from protobuf==3.13.0->-r requirements.txt (line 11)) (58.1.0)
Using legacy 'setup.py install' for fire, since package 'wheel' is not installed.
Using legacy 'setup.py install' for grpcio, since package 'wheel' is not installed.
Using legacy 'setup.py install' for termcolor, since package 'wheel' is not installed.
Building wheels for collected packages: aiohttp, multidict, yarl
  Building wheel for aiohttp (pyproject.toml) ... done
  Created wheel for aiohttp: filename=aiohttp-3.7.4.post0-py3-none-any.whl size=451945 sha256=c32092ef86907fbfcf8888ad253f34ca05a94479b3fab2437710d099d0245115
  Stored in directory: /home/jack/.cache/pip/wheels/fc/84/e0/52113c57eb9b09b6b187a0f369eaad6fc7fc64bb7247c83b89
  Building wheel for multidict (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for multidict (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [48 lines of output]
      *********************
      * Accelerated build *
      *********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/_compat.py -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/_multidict_py.py -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/_multidict_base.py -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/_abc.py -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/__init__.py -> build/lib.linux-x86_64-cpython-310/multidict
      running egg_info
      writing multidict.egg-info/PKG-INFO
      writing dependency_links to multidict.egg-info/dependency_links.txt
      writing top-level names to multidict.egg-info/top_level.txt
      reading manifest file 'multidict.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files found matching 'multidict/_multidict.html'
      warning: no previously-included files found matching 'multidict/*.so'
      warning: no previously-included files found matching 'multidict/*.pyd'
      warning: no previously-included files found matching 'multidict/*.pyd'
      no previously-included directories found matching 'docs/_build'
      adding license file 'LICENSE'
      writing manifest file 'multidict.egg-info/SOURCES.txt'
      copying multidict/__init__.pyi -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/_multidict.c -> build/lib.linux-x86_64-cpython-310/multidict
      copying multidict/py.typed -> build/lib.linux-x86_64-cpython-310/multidict
      creating build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/defs.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/dict.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/istr.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/iter.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/pair_list.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      copying multidict/_multilib/views.h -> build/lib.linux-x86_64-cpython-310/multidict/_multilib
      running build_ext
      building 'multidict._multidict' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/multidict
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/jack/work/azure-python-labs/01-dapr/env/include -I/usr/include/python3.10 -c multidict/_multidict.c -o build/temp.linux-x86_64-cpython-310/multidict/_multidict.o -O2 -std=c99 -Wall -Wsign-compare -Wconversion -fno-strict-aliasing -pedantic
      multidict/_multidict.c:1:10: fatal error: Python.h: No such file or directory
          1 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for multidict
  Building wheel for yarl (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for yarl (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [43 lines of output]
      **********************
      * Accellerated build *
      **********************
      running bdist_wheel
      running build
      running build_py
      creating build
      creating build/lib.linux-x86_64-cpython-310
      creating build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_url.py -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_quoting_py.py -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_quoting.py -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/__init__.py -> build/lib.linux-x86_64-cpython-310/yarl
      running egg_info
      writing yarl.egg-info/PKG-INFO
      writing dependency_links to yarl.egg-info/dependency_links.txt
      writing requirements to yarl.egg-info/requires.txt
      writing top-level names to yarl.egg-info/top_level.txt
      reading manifest file 'yarl.egg-info/SOURCES.txt'
      reading manifest template 'MANIFEST.in'
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.cache' found anywhere in distribution
      warning: no previously-included files found matching 'yarl/*.html'
      warning: no previously-included files found matching 'yarl/*.so'
      warning: no previously-included files found matching 'yarl/*.pyd'
      no previously-included directories found matching 'docs/_build'
      adding license file 'LICENSE'
      writing manifest file 'yarl.egg-info/SOURCES.txt'
      copying yarl/__init__.pyi -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_quoting_c.c -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_quoting_c.pyi -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/_quoting_c.pyx -> build/lib.linux-x86_64-cpython-310/yarl
      copying yarl/py.typed -> build/lib.linux-x86_64-cpython-310/yarl
      running build_ext
      building 'yarl._quoting_c' extension
      creating build/temp.linux-x86_64-cpython-310
      creating build/temp.linux-x86_64-cpython-310/yarl
      x86_64-linux-gnu-gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/home/jack/work/azure-python-labs/01-dapr/env/include -I/usr/include/python3.10 -c yarl/_quoting_c.c -o build/temp.linux-x86_64-cpython-310/yarl/_quoting_c.o
      yarl/_quoting_c.c:4:10: fatal error: Python.h: No such file or directory
          4 | #include "Python.h"
            |          ^~~~~~~~~~
      compilation terminated.
      error: command '/usr/bin/x86_64-linux-gnu-gcc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for yarl
Successfully built aiohttp
Failed to build multidict yarl
ERROR: Could not build wheels for multidict, yarl, which is required to install pyproject.toml-based projects

Python 3.9 (working) output:

Python 3.9 output
❯ pip install -r requirements.txt
Collecting aiohttp==3.7.4.post0
  Downloading aiohttp-3.7.4.post0-cp39-cp39-manylinux2014_x86_64.whl (1.4 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.4/1.4 MB 2.9 MB/s eta 0:00:00
Collecting async-timeout==3.0.1
  Using cached async_timeout-3.0.1-py3-none-any.whl (8.2 kB)
Collecting attrs==20.3.0
  Using cached attrs-20.3.0-py2.py3-none-any.whl (49 kB)
Collecting certifi==2020.12.5
  Using cached certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
Collecting chardet==3.0.4
  Using cached chardet-3.0.4-py2.py3-none-any.whl (133 kB)
Collecting dapr==1.1.0
  Using cached dapr-1.1.0-py3-none-any.whl (70 kB)
Collecting fire==0.4.0
  Using cached fire-0.4.0.tar.gz (87 kB)
  Preparing metadata (setup.py) ... done
Collecting grpcio==1.37.1
  Downloading grpcio-1.37.1-cp39-cp39-manylinux2014_x86_64.whl (4.2 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 4.2/4.2 MB 5.5 MB/s eta 0:00:00
Collecting idna==2.10
  Using cached idna-2.10-py2.py3-none-any.whl (58 kB)
Collecting multidict==5.1.0
  Downloading multidict-5.1.0-cp39-cp39-manylinux2014_x86_64.whl (151 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 151.2/151.2 KB 5.4 MB/s eta 0:00:00
Collecting protobuf==3.13.0
  Using cached protobuf-3.13.0-py2.py3-none-any.whl (438 kB)
Collecting python-dateutil==2.8.1
  Using cached python_dateutil-2.8.1-py2.py3-none-any.whl (227 kB)
Collecting requests==2.25.1
  Using cached requests-2.25.1-py2.py3-none-any.whl (61 kB)
Collecting six==1.15.0
  Using cached six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting termcolor==1.1.0
  Using cached termcolor-1.1.0.tar.gz (3.9 kB)
  Preparing metadata (setup.py) ... done
Collecting typing-extensions==3.7.4.3
  Using cached typing_extensions-3.7.4.3-py3-none-any.whl (22 kB)
Collecting urllib3==1.26.3
  Using cached urllib3-1.26.3-py2.py3-none-any.whl (137 kB)
Collecting yarl==1.6.3
  Downloading yarl-1.6.3-cp39-cp39-manylinux2014_x86_64.whl (315 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 315.0/315.0 KB 24.9 MB/s eta 0:00:00
Requirement already satisfied: setuptools in ./env/lib/python3.9/site-packages (from protobuf==3.13.0->-r requirements.txt (line 11)) (58.1.0)
Using legacy 'setup.py install' for fire, since package 'wheel' is not installed.
Using legacy 'setup.py install' for termcolor, since package 'wheel' is not installed.
Installing collected packages: typing-extensions, termcolor, chardet, certifi, urllib3, six, multidict, idna, attrs, async-timeout, yarl, requests, python-dateutil, protobuf, grpcio, fire, aiohttp, dapr
  Running setup.py install for termcolor ... done
  Running setup.py install for fire ... done
Successfully installed aiohttp-3.7.4.post0 async-timeout-3.0.1 attrs-20.3.0 certifi-2020.12.5 chardet-3.0.4 dapr-1.1.0 fire-0.4.0 grpcio-1.37.1 idna-2.10 multidict-5.1.0 protobuf-3.13.0 python-dateutil-2.8.1 requests-2.25.1 six-1.15.0 termcolor-1.1.0 typing-extensions-3.7.4.3 urllib3-1.26.3 yarl-1.6.3

Expected/desired behavior

I expected either no errors or information in the README on what Python versions are supported.

OS and Version?

Ubuntu 20.04

Versions

python3.8, python3.8-venv from standard repositories
python3.9, python3.9-venv, python3.10, python3.10-venv from deadsnakes ppa

Mention any other details that might be useful

Can't think of anything else

@meisa233
Copy link

meisa233 commented Apr 6, 2023

This is my solution.

pip install -U setuptools
pip install ujson

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

No branches or pull requests

2 participants