Skip to content

PyBuilder issue while installing Crypto libs on Mac OS Big Sur #777

Closed

Description

@rakshit-jain

I am facing a weird issue while using PYB in my python virtual env. PYB is unable to install some dependencies on Mac OS Big Sur. I tried to read about this issue and came to know it’s fixed in the latest PIP version i.e. 21.2.2.

As you already know PyBuilder 0.12.10 uses 20.2.3 which is not compatible with crypto libraries on Mac OS Big Sur. This is a dependency resolution issue that can be fixed if packaged PIP version in PYB can be upgraded to the latest one.

ERROR: Failed building wheel for wrapt
Running setup.py clean for wrapt
Failed to build cryptography MarkupSafe wrapt
ERROR: Could not build wheels for cryptography which use PEP 517 and cannot be installed directly
WARNING: You are using pip version 20.2.3; however, version 21.2.2 is available.

Python Version: Python 3.7.11 (On MAC and Virtual Env)
PIP version : 21.2.2 (On MAC and virtual env)
PYB version: 0.12.10

Activity

  1. arcivanov commented on Sep 5, 2021

    @arcivanov
    Member

    Could you please install --pre of PyBuilder and try again?
    Thanks!

  2. arcivanov commented on Sep 8, 2021

    @arcivanov
    Member
  3. rakshit-jain commented on Sep 8, 2021

    @rakshit-jain
    Author

    Acknowledged

  4. rakshit-jain commented on Sep 8, 2021

    @rakshit-jain
    Author

    I am getting the below error. Any suggestions? This is the output of pyb -v as well as pyb install_dependencies

    PyBuilder version 0.13.0.dev20210908053645
    Build started at 2021-09-08 11:42:44
    BUILD FAILED - ModuleNotFoundError: No module named 'pybuilder._vendor.virtualenv.activation.xonsh' (:965)

  5. arcivanov commented on Sep 8, 2021

    @arcivanov
    Member

    Please run with -vX and paste the logs.

  6. rakshit-jain commented on Sep 8, 2021

    @rakshit-jain
    Author
    [DEBUG] Registered Python environment 'system': CPython version 3.7.11.final.0 on darwin in ['/usr/local/opt/[email protected]/bin/python3.7']
    PyBuilder version 0.13.0.dev20210908053645
    Build started at 2021-09-08 12:55:52
    [DEBUG] Loading project module from ./build.py
    [DEBUG] Setting up plugins VEnv at -----/.pybuilder/plugins/cpython-3.7.11.final.0'
    Traceback (most recent call last):
      File "/usr/local/lib/python3.7/site-packages/pybuilder/cli.py", line 468, in main
        no_venvs=options.no_venvs
      File "/usr/local/lib/python3.7/site-packages/pybuilder/reactor.py", line 203, in prepare_build
        self._setup_plugin_directory(reset_plugins, no_venvs)
      File "/usr/local/lib/python3.7/site-packages/pybuilder/reactor.py", line 517, in _setup_plugin_directory
        offline=self.project.offline)
      File "/usr/local/lib/python3.7/site-packages/pybuilder/python_env.py", line 223, in create_venv
        logger=self.logger)
      File "/usr/local/lib/python3.7/site-packages/pybuilder/python_env.py", line 420, in create_venv
        virtualenv.cli_run(args, setup_logging=False)
      File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/__init__.py", line 30, in cli_run
        of_session = session_via_cli(args, options, setup_logging, env)
      File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/__init__.py", line 48, in session_via_cli
        parser, elements = build_parser(args, options, setup_logging, env)
      File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/__init__.py", line 76, in build_parser
        ActivationSelector(interpreter, parser),
      File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/plugin/activators.py", line 13, in __init__
        (k, v) for k, v in self.options("virtualenv.activate").items() if v.supports(interpreter)
      File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/plugin/base.py", line 35, in options
        cls._OPTIONS = cls.entry_points_for(key)
      File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/plugin/base.py", line 14, in entry_points_for
        return OrderedDict((e.name, e.load()) for e in cls.entry_points().select(group=key))
      File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/virtualenv/run/plugin/base.py", line 14, in <genexpr>
        return OrderedDict((e.name, e.load()) for e in cls.entry_points().select(group=key))
      File "/usr/local/lib/python3.7/site-packages/pybuilder/_vendor/importlib_metadata/__init__.py", line 194, in load
        module = import_module(match.group('module'))
      File "/usr/local/Cellar/[email protected]/3.7.11/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
      File "<frozen importlib._bootstrap>", line 668, in _load_unlocked
      File "<frozen importlib._bootstrap>", line 638, in _load_backward_compatible
      File "/usr/local/lib/python3.7/site-packages/pybuilder/extern/__init__.py", line 75, in load_module
        mod = import_module(extant)
      File "/usr/local/Cellar/[email protected]/3.7.11/Frameworks/Python.framework/Versions/3.7/lib/python3.7/importlib/__init__.py", line 127, in import_module
        return _bootstrap._gcd_import(name[level:], package, level)
      File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
      File "<frozen importlib._bootstrap>", line 983, in _find_and_load
      File "<frozen importlib._bootstrap>", line 965, in _find_and_load_unlocked
    ModuleNotFoundError: No module named 'pybuilder._vendor.virtualenv.activation.xonsh'
    
    BUILD FAILED - ModuleNotFoundError: No module named 'pybuilder._vendor.virtualenv.activation.xonsh' (<frozen importlib._bootstrap>:965)
    Build finished at 2021-09-08 12:55:52
    Build took 0 seconds (204 ms)
    
  7. arcivanov commented on Sep 12, 2021

    @arcivanov
    Member

    Hmm... I can't seem to reproduce this issue on GitHub Actions with BigSur and Homebrew.

    https://github.com/pybuilder/pybuilder/commit/618512b0f356e3314b1218ae7c0192b9fea49c6b/checks/3581148423/logs

    Could you please check to see the logs if anything jumps at you as different from how your system is configured?

  8. arcivanov commented on Sep 17, 2021

    @arcivanov
    Member

    @rakshit-jain Please test with the latest --pre and let me know. Thanks!

  9. rakshit-jain commented on Sep 20, 2021

    @rakshit-jain
    Author

    @rakshit-jain Please test with the latest --pre and let me know. Thanks!

    It took me a long to test because of the weekend. I have tested with the latest build and it's working as expected. Great work.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions