Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Package installation fails after new release v2.2.0 #620

Closed
pauliuskrispis opened this issue Jun 22, 2023 · 7 comments
Closed

Package installation fails after new release v2.2.0 #620

pauliuskrispis opened this issue Jun 22, 2023 · 7 comments

Comments

@pauliuskrispis
Copy link

Describe the bug

Hi guys! I cannot seem to install mysqlclient via pip after the new release (v2.2.0).

Dropping the stack trace:

Collecting mysqlclient (from mysql==0.0.3->-r /app/requirements.txt (line 12))
  Downloading mysqlclient-2.2.0.tar.gz (89 kB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 250.3 MB/s eta 0:00:00
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error
  
  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [24 lines of output]
      /bin/sh: 1: pkg-config: not found
      /bin/sh: 1: pkg-config: not found
      Trying pkg-config --exists mysqlclient
      Command 'pkg-config --exists mysqlclient' returned non-zero exit status 127.
      Trying pkg-config --exists mariadb
      Command 'pkg-config --exists mariadb' returned non-zero exit status 127.
      Traceback (most recent call last):
        File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
          main()
        File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
        File "/usr/local/lib/python3.8/dist-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
        File "/tmp/pip-build-env-d4slkkxg/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
        File "/tmp/pip-build-env-d4slkkxg/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
          self.run_setup()
        File "/tmp/pip-build-env-d4slkkxg/overlay/lib/python3.8/site-packages/setuptools/build_meta.py", line 338, in run_setup
          exec(code, locals())
        File "<string>", line 154, in <module>
        File "<string>", line 48, in get_config_posix
        File "<string>", line 27, in find_package_name
      Exception: Can not find valid pkg-config name.
      Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

I just want to verify if this is related to the new release.

@eljeffeg
Copy link

I can confirm from my testing that 2.1.1 worked fine and 2.2.0 failed to build for me as seen by @pauliuskrispis

@methane
Copy link
Member

methane commented Jun 22, 2023

As message said, you need to install pkg-config

@methane
Copy link
Member

methane commented Jun 22, 2023

Read #584

@methane methane closed this as completed Jun 22, 2023
@eljeffeg
Copy link

eljeffeg commented Jun 22, 2023

@methane Alpine Linux doesn't have a pkg-config package. It does have a pkgconfig but installing that didn't resolve the issue for me.

@methane
Copy link
Member

methane commented Jun 22, 2023

You should fix it by yourself or alpine community.

@darktohka
Copy link

darktohka commented Jun 22, 2023

Same issue here, please fix this as soon as possible. Reopen the issue as it is important.

Exporting environment variables as a workaround is definitely not proper.

methane pushed a commit that referenced this issue Jun 22, 2023
@jgb
Copy link

jgb commented Jun 22, 2023

@methane I've got pkg-config installed, but still mysqlclient >= 2.2.0 fails to install as follows on Ubuntu 22.04 LTS and python 3.10:

Collecting mysqlclient==2.2.0 (from -r base-requirements.txt (line 65))                                                                                                                                                                        
  Downloading mysqlclient-2.2.0.tar.gz (89 kB)                                                                                                                                                                                                 
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 89.5/89.5 kB 8.4 MB/s eta 0:00:00                                                                                                                                                                
  Installing build dependencies ... done                                                                                                                                                                                                       
  Getting requirements to build wheel ... error                                                                                                                                                                                                
  error: subprocess-exited-with-error                                                                                                                                                                                                          
                                                                                                                                                                                                                                               
  × Getting requirements to build wheel did not run successfully.                                                                                                                                                                              
  │ exit code: 1                                                                                                                                                                                                                               
  ╰─> [22 lines of output]                                                                                                                                                                                                                     
      Trying pkg-config --exists mysqlclient                                                                                                                                                                                                   
      Command 'pkg-config --exists mysqlclient' returned non-zero exit status 1.                                                                                                                                                               
      Trying pkg-config --exists mariadb                                                                                                                                                                                                       
      Command 'pkg-config --exists mariadb' returned non-zero exit status 1.                                                                                                                                                                   
      Traceback (most recent call last):                                                                                                                                                                                                       
        File "/home/quividi/.venv/vidicenter/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>                                                                                       
          main()                                                                                                                                                                                                                               
        File "/home/quividi/.venv/vidicenter/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main                                                                                           
          json_out['return_val'] = hook(**hook_input['kwargs'])                                                                                                                                                                                
        File "/home/quividi/.venv/vidicenter/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel                                                                   
          return hook(config_settings)                                                                                                                                                                                                         
        File "/tmp/pip-build-env-vvrc6ll4/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel                                                                                            
          return self._get_build_requires(config_settings, requirements=['wheel'])                                                                                                                                                             
        File "/tmp/pip-build-env-vvrc6ll4/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires                                                                                                     
          self.run_setup()                                                                                                                                                                                                                     
        File "/tmp/pip-build-env-vvrc6ll4/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 338, in run_setup                                                                                                               
          exec(code, locals())                                                                                                                                                                                                                 
        File "<string>", line 154, in <module>                                                                                                                                                                                                 
        File "<string>", line 48, in get_config_posix                                                                                                                                                                                          
        File "<string>", line 27, in find_package_name                                                                                                                                                                                         
      Exception: Can not find valid pkg-config name.                                                                                                                                                                                           
      Specify MYSQLCLIENT_CFLAGS and MYSQLCLIENT_LDFLAGS env vars manually                                                                                                                                                                     
      [end of output]                                                                                                                                                                                                                          
                                                                                                                                                                                                                                               
  note: This error originates from a subprocess, and is likely not a problem with pip.                                                                                                                                                         
error: subprocess-exited-with-error                                                                                                                                                                                                            
                                                                                                                                                                                                                                               
× Getting requirements to build wheel did not run successfully.                                                                                                                                                                                
│ exit code: 1                                                                                                                                                                                                                                 
╰─> See above for output.                                                                                                                                                                                                                      
                                                                                                                                                                                                                                               
note: This error originates from a subprocess, and is likely not a problem with pip.          

@PyMySQL PyMySQL locked and limited conversation to collaborators Jun 22, 2023
@methane methane converted this issue into discussion #624 Jun 22, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants