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

cannot install from source #7802

Closed
1 task done
jmgurney opened this issue Nov 8, 2023 · 4 comments
Closed
1 task done

cannot install from source #7802

jmgurney opened this issue Nov 8, 2023 · 4 comments
Labels
bug invalid This doesn't seem right

Comments

@jmgurney
Copy link

jmgurney commented Nov 8, 2023

Describe the bug

Attempting to install from source (pip install 'https://github.com/aio-libs/aiohttp/releases/download/v3.9.0b1/aiohttp-3.9.0b1.tar.gz'), or from the git repository fails (see below).

It appears that setup.py is missing the necessary execution steps to convert the pyx files to c files for building.

To Reproduce

  1. create venv: python -m venv venv
  2. source venv: . ./venv/bin/activate
  3. attempt to install aiohttp: pip install 'git+https://github.com/aio-libs/aiohttp#egg=aiohttp'

Expected behavior

I expect that aiohttp will be installed and usable.

Logs/tracebacks

(venv) amac,ttys036,/tmp/ah,508$pip install 'git+https://github.com/aio-libs/aiohttp#egg=aiohttp'   
Collecting aiohttp                                                                                  
  Cloning https://github.com/aio-libs/aiohttp to /private/var/folders/sn/5ywwqs956s787kl7h21lmk400000gn/T/pip-install-01i7d6ae/aiohttp_01b26dc43929497cba7808ec9e43b28f
  Running command git clone --filter=blob:none --quiet https://github.com/aio-libs/aiohttp /private/var/folders/sn/5ywwqs956s787kl7h21lmk400000gn/T/pip-install-01i7d6ae/aiohttp_01b26dc43929497cba7808ec
9e43b28f                      
  Resolved https://github.com/aio-libs/aiohttp to commit 5f64328cb4aa4e551090c2a4d52334d0fc529ad3
  Running command git submodule update --init --recursive -q                                        
  Installing build dependencies ... done                                                            
  Getting requirements to build wheel ... done                                                      
  Installing backend dependencies ... done                                                          
  Preparing metadata (pyproject.toml) ... done
Collecting frozenlist>=1.1.1                                                                        
  Using cached frozenlist-1.4.0-cp310-cp310-macosx_11_0_arm64.whl (46 kB)                  
Collecting aiosignal>=1.1.2                                                                         
  Using cached aiosignal-1.3.1-py3-none-any.whl (7.6 kB)                                            
Collecting async-timeout<5.0,>=4.0                                                                  
  Using cached async_timeout-4.0.3-py3-none-any.whl (5.7 kB)                                        
Collecting yarl<2.0,>=1.0                                                                           
  Using cached yarl-1.9.2-cp310-cp310-macosx_11_0_arm64.whl (62 kB)                                 
Collecting multidict<7.0,>=4.5                                                                      
  Using cached multidict-6.0.4-cp310-cp310-macosx_11_0_arm64.whl (29 kB)                            
Collecting idna>=2.0                   
  Using cached idna-3.4-py3-none-any.whl (61 kB)                                                    
Building wheels for collected packages: aiohttp                                                     
  Building wheel for aiohttp (pyproject.toml) ... error                                  
  error: subprocess-exited-with-error                                                               
                                                                                                    
  × Building wheel for aiohttp (pyproject.toml) did not run successfully.                
  │ exit code: 1                                                                                    
  ╰─> [89 lines of output]                                                                          
      *********************                                                                         
      * Accelerated build *                                                                         
      *********************                                                                         
      running bdist_wheel                                                                           
      running build                                                                                 
      running build_py                                                                                                                                                                                         creating build                                                                                                                                                                                           creating build/lib.macosx-14.0-arm64-cpython-310                                  
      creating build/lib.macosx-14.0-arm64-cpython-310/aiohttp                 
      copying aiohttp/web_ws.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp           
      copying aiohttp/worker.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp
      copying aiohttp/multipart.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp        
      copying aiohttp/web_response.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp
      copying aiohttp/client_ws.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp     
      copying aiohttp/test_utils.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp  
      copying aiohttp/tracing.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp
      copying aiohttp/web_exceptions.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                                                                                                               
      copying aiohttp/web_middlewares.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp
      copying aiohttp/web.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp       
      copying aiohttp/http_exceptions.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp
      copying aiohttp/web_app.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                                                                                                                      
      copying aiohttp/streams.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                                                                                                                      
      copying aiohttp/web_protocol.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                                                                                                                 
      copying aiohttp/log.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp    
      copying aiohttp/compression_utils.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp
      copying aiohttp/client.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp               
      copying aiohttp/web_urldispatcher.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp       
      copying aiohttp/web_request.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp             
      copying aiohttp/http_websocket.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp          
      copying aiohttp/client_proto.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp            
      copying aiohttp/locks.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                   
      copying aiohttp/__init__.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                                                                                                                     
      copying aiohttp/web_runner.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp              
      copying aiohttp/web_server.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp              
      copying aiohttp/base_protocol.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp           
      copying aiohttp/payload.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                 
      copying aiohttp/client_reqrep.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp           
      copying aiohttp/http.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                                                                                                                         
      copying aiohttp/web_log.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                                                                                                                      
      copying aiohttp/resolver.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp
      copying aiohttp/formdata.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp             
      copying aiohttp/web_routedef.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp            
      copying aiohttp/connector.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp               
      copying aiohttp/client_exceptions.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp       
      copying aiohttp/typedefs.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                
      copying aiohttp/hdrs.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp
      copying aiohttp/web_fileresponse.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp        
      copying aiohttp/http_writer.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp    
      copying aiohttp/tcp_helpers.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp             
      copying aiohttp/helpers.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                 
      copying aiohttp/http_parser.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp             
      copying aiohttp/cookiejar.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp               
      copying aiohttp/pytest_plugin.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp           
      copying aiohttp/abc.py -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp                     
      running egg_info                                                                              
      writing aiohttp.egg-info/PKG-INFO                                                             
      writing dependency_links to aiohttp.egg-info/dependency_links.txt
      writing requirements to aiohttp.egg-info/requires.txt                                         
      writing top-level names to aiohttp.egg-info/top_level.txt                                     
      reading manifest file 'aiohttp.egg-info/SOURCES.txt'                               
      reading manifest template 'MANIFEST.in'                                                       
      warning: no files found matching 'aiohttp' anywhere in distribution                           
      warning: no previously-included files matching '*.pyc' found anywhere in distribution
      warning: no previously-included files matching '*.pyd' found anywhere in distribution         
      warning: no previously-included files matching '*.so' found anywhere in distribution          
      warning: no previously-included files matching '*.lib' found anywhere in distribution         
      warning: no previously-included files matching '*.dll' found anywhere in distribution         
      warning: no previously-included files matching '*.a' found anywhere in distribution           
      warning: no previously-included files matching '*.obj' found anywhere in distribution         
      warning: no previously-included files found matching 'aiohttp/*.html'                         
      no previously-included directories found matching 'docs/_build'                                                                                                                                          adding license file 'LICENSE.txt'                                                                                                                                                                        writing manifest file 'aiohttp.egg-info/SOURCES.txt'                              
      copying aiohttp/_cparser.pxd -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp
      copying aiohttp/_find_header.pxd -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp    
      copying aiohttp/_helpers.pyi -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp
      copying aiohttp/_helpers.pyx -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp        
      copying aiohttp/_http_parser.pyx -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp
      copying aiohttp/_http_writer.pyx -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp 
      copying aiohttp/_websocket.pyx -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp 
      copying aiohttp/py.typed -> build/lib.macosx-14.0-arm64-cpython-310/aiohttp  
      running build_ext                                                                                                                                                                                  
      building 'aiohttp._websocket' extension                                                       
      creating build/temp.macosx-14.0-arm64-cpython-310                               
      creating build/temp.macosx-14.0-arm64-cpython-310/aiohttp                            
      /usr/bin/clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -pipe -Os -i
sysroot/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -I/private/tmp/ah/venv/include -I/opt/local/Library/Frameworks/Python.framework/Versions/3.10/include/python3.10 -c aiohttp/_websocket.c -o 
build/temp.macosx-14.0-arm64-cpython-310/aiohttp/_websocket.o                                                                                                                                            
      clang: error: no such file or directory: 'aiohttp/_websocket.c'              
      clang: error: no input files                                                                  
      error: command '/usr/bin/clang' 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 aiohttp                                                          
Failed to build aiohttp                                                                                                                                                                                  
ERROR: Could not build wheels for aiohttp, which is required to install pyproject.toml-based projects
                                                                                                    
[notice] A new release of pip is available: 23.0.1 -> 23.3.1                               
[notice] To update, run: pip install --upgrade pip                                                                                                                                                       

Python Version

$ python --version

Python 3.10.13

aiohttp Version

$ python -m pip show aiohttp

WARNING: Package(s) not found: aiohttp

multidict Version

$ python -m pip show multidict


WARNING: Package(s) not found: multidict

yarl Version

$ python -m pip show yarl

WARNING: Package(s) not found: yarl

OS

Darwin amac.funkthat.com 23.1.0 Darwin Kernel Version 23.1.0: Mon Oct  9 21:27:24 PDT 2023; root:xnu-10002.41.9~6/RELEASE_ARM64_T6000 arm64

MacOS 14.1 (23B74)

Related component

Server, Client

Additional context

No response

Code of Conduct

  • I agree to follow the aio-libs Code of Conduct
@jmgurney jmgurney added the bug label Nov 8, 2023
@webknjaz
Copy link
Member

webknjaz commented Nov 8, 2023

This is by design, currently. Building from source requires cloning a Git repository and including the llhttp submodule. GitHub's Git archive exports don't include submodules recursively so you download an incomplete snapshot of the repo.

The only official source to build from like that is the sdist on PyPI. Use that.

@webknjaz webknjaz closed this as not planned Won't fix, can't repro, duplicate, stale Nov 8, 2023
@webknjaz webknjaz added bug invalid This doesn't seem right and removed bug labels Nov 8, 2023
@jmgurney
Copy link
Author

jmgurney commented Nov 8, 2023

Just in case anyone in the future wants to address it, my comment here has a simple solution:
#4810 (comment)

@webknjaz
Copy link
Member

webknjaz commented Nov 8, 2023

I added a comment there explaining that the idea has bad consequences. We wouldn't accept such a hack.

@alexrudd2
Copy link
Contributor

alexrudd2 commented Nov 9, 2023

Just in case anyone in the future wants to address it, my comment here has a simple solution: #4810 (comment)

Thank you for this, it was helpful to bisect to find a recent regression with 3.9.0b1. (In this case, I don't care about performance and the install instructions are inadequate)

EDIT: git clone https://github.com/aio-libs/aiohttp.git --recurse-submodules is what failed to build.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

3 participants