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

Locust install issue - M1 Mac #1949

Closed
sukhcha-in opened this issue Nov 30, 2021 · 7 comments
Closed

Locust install issue - M1 Mac #1949

sukhcha-in opened this issue Nov 30, 2021 · 7 comments

Comments

@sukhcha-in
Copy link

Describe the bug

Installation fails on M1 Mac
gevent fails to install

Steps to reproduce

sukh@Sukhchains-Mac-mini Locust % python3 -m venv venv
sukh@Sukhchains-Mac-mini Locust % source venv/bin/activate
(venv) sukh@Sukhchains-Mac-mini Locust % pip3 install locust
Collecting locust
  Using cached locust-2.5.0-py3-none-any.whl (795 kB)
Collecting ConfigArgParse>=1.0
  Using cached ConfigArgParse-1.5.3-py3-none-any.whl (20 kB)
Collecting msgpack>=0.6.2
  Using cached msgpack-1.0.3.tar.gz (123 kB)
Collecting Werkzeug>=2.0.0
  Using cached Werkzeug-2.0.2-py3-none-any.whl (288 kB)
Collecting roundrobin>=0.0.2
  Using cached roundrobin-0.0.2.tar.gz (2.4 kB)
Collecting typing-extensions>=3.7.4.3
  Using cached typing_extensions-4.0.0-py3-none-any.whl (22 kB)
Collecting Flask-BasicAuth>=0.2.0
  Using cached Flask-BasicAuth-0.2.0.tar.gz (16 kB)
Collecting requests>=2.9.1
  Using cached requests-2.26.0-py2.py3-none-any.whl (62 kB)
Collecting flask>=2.0.0
  Using cached Flask-2.0.2-py3-none-any.whl (95 kB)
Collecting gevent>=20.9.0
  Using cached gevent-21.8.0.tar.gz (6.2 MB)
  Installing build dependencies ... error
  ERROR: Command errored out with exit status 1:
   command: /Users/sukh/Documents/Python/Locust/venv/bin/python3 /Users/sukh/Documents/Python/Locust/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/js/7507s78n4_j84zhwv9l_2tzh0000gn/T/pip-build-env-96300qvd/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.8.0' wheel 'Cython >= 3.0a9' 'cffi >= 1.12.3 ; platform_python_implementation == '"'"'CPython'"'"'' 'greenlet >= 0.4.17, < 2.0 ; platform_python_implementation == '"'"'CPython'"'"''
       cwd: None
  Complete output (29 lines):
  Collecting setuptools>=40.8.0
    Using cached setuptools-59.4.0-py3-none-any.whl (952 kB)
  Collecting wheel
    Using cached wheel-0.37.0-py2.py3-none-any.whl (35 kB)
  Collecting Cython>=3.0a9
    Using cached Cython-3.0.0a9-py2.py3-none-any.whl (1.1 MB)
  Collecting cffi>=1.12.3
    Using cached cffi-1.15.0.tar.gz (484 kB)
      ERROR: Command errored out with exit status 1:
       command: /Users/sukh/Documents/Python/Locust/venv/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/js/7507s78n4_j84zhwv9l_2tzh0000gn/T/pip-install-7kyh8j18/cffi/setup.py'"'"'; __file__='"'"'/private/var/folders/js/7507s78n4_j84zhwv9l_2tzh0000gn/T/pip-install-7kyh8j18/cffi/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 /private/var/folders/js/7507s78n4_j84zhwv9l_2tzh0000gn/T/pip-pip-egg-info-f1xkpk4j
           cwd: /private/var/folders/js/7507s78n4_j84zhwv9l_2tzh0000gn/T/pip-install-7kyh8j18/cffi/
      Complete output (13 lines):
      Traceback (most recent call last):
        File "<string>", line 1, in <module>
        File "/private/var/folders/js/7507s78n4_j84zhwv9l_2tzh0000gn/T/pip-install-7kyh8j18/cffi/setup.py", line 147, in <module>
          use_pkg_config()
        File "/private/var/folders/js/7507s78n4_j84zhwv9l_2tzh0000gn/T/pip-install-7kyh8j18/cffi/setup.py", line 111, in use_pkg_config
          _ask_pkg_config(include_dirs,       '--cflags-only-I', '-I', sysroot=True)
        File "/private/var/folders/js/7507s78n4_j84zhwv9l_2tzh0000gn/T/pip-install-7kyh8j18/cffi/setup.py", line 23, in _ask_pkg_config
          p = subprocess.Popen([pkg_config, option, 'libffi'],
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 858, in __init__
          self._execute_child(args, executable, preexec_fn, close_fds,
        File "/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/lib/python3.8/subprocess.py", line 1704, in _execute_child
          raise child_exception_type(errno_num, err_msg, err_filename)
      NotADirectoryError: [Errno 20] Not a directory: 'pkg-config'
      ----------------------------------------
  ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
  WARNING: You are using pip version 20.2.3; however, version 21.3.1 is available.
  You should consider upgrading via the '/Users/sukh/Documents/Python/Locust/venv/bin/python3 -m pip install --upgrade pip' command.
  ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/sukh/Documents/Python/Locust/venv/bin/python3 /Users/sukh/Documents/Python/Locust/venv/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /private/var/folders/js/7507s78n4_j84zhwv9l_2tzh0000gn/T/pip-build-env-96300qvd/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools >= 40.8.0' wheel 'Cython >= 3.0a9' 'cffi >= 1.12.3 ; platform_python_implementation == '"'"'CPython'"'"'' 'greenlet >= 0.4.17, < 2.0 ; platform_python_implementation == '"'"'CPython'"'"'' Check the logs for full command output.

Environment

  • OS: macOS on M1
  • Python version: 3.8.9
@sukhcha-in sukhcha-in added the bug label Nov 30, 2021
@cyberw
Copy link
Collaborator

cyberw commented Nov 30, 2021

I dont have an M1 to test with. Can you reproduce it by just installing just cffi (or gevent) directly? In that case, maybe file an issue with them?

@brendandebeasi
Copy link

Have you tried running it within Docker? I haven't had any issues on my 2021 16" M1 MBP

@Hritik14
Copy link

I just tried installing locust on my M1 and it installed without any problem.

@mnvum
Copy link

mnvum commented Dec 13, 2021

I have the same problem.

OS: macOS on M1
Python version: 3.11

log.txt

@cyberw
Copy link
Collaborator

cyberw commented Dec 13, 2021

I have the same problem.

OS: macOS on M1 Python version: 3.11

I dont think that is the same problem? Your logs look look like it fails building greenlet, not cffi? There are no pre-built wheels for python 3.11, and it is not really supported yet.

Either way: Please try installing the respective packages directly and (assuming that fails) file tickets for the respective packages instead.

@mnvum
Copy link

mnvum commented Dec 13, 2021

I have the same problem.
OS: macOS on M1 Python version: 3.11

I dont think that is the same problem? Your logs look look like it fails building greenlet, not cffi? There are no pre-built wheels for python 3.11, and it is not really supported yet.

Either way: Please try installing the respective packages directly and (assuming that fails) file tickets for the respective packages instead.

Thank you for your reply. I have just solved it.

Use Python 3.10

@sukhcha-in
Copy link
Author

Closing this issue, I used npm package autocannon instead.
Locust might be better than autocannon but I just wanted to test one http path so it worked fine.

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

No branches or pull requests

5 participants