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

conda create environment throwing error : AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms' #12234

Open
2 tasks done
ShilpaJalaja opened this issue Jan 10, 2023 · 9 comments
Labels
source::community catch-all for issues filed by community members stale [bot] marked as stale due to inactivity type::bug describes erroneous operation, use severity::* to classify the type

Comments

@ShilpaJalaja
Copy link

ShilpaJalaja commented Jan 10, 2023

Checklist

  • I added a descriptive title
  • I searched open reports and couldn't find a duplicate

What happened?

We have Jenkins job , which has a script that creates conda environment, activates it , and performs certain actions further. The job was running fine for almost 3 months now, and it started failing suddenly at create environment step from today onwards. Below is the error:

Traceback (most recent call last):
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1118, in __call__
    return func(*args, **kwargs)
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/cli/main.py", line 57, in main_subshell
    p = generate_parser()
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 40, in generate_parser
    p = ArgumentParser(
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/cli/conda_argparse.py", line 117, in __init__
    self._subcommands = context.plugin_manager.get_hook_results("subcommands")
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/base/context.py", line 421, in plugin_manager
    from ..plugins.manager import get_plugin_manager
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/plugins/__init__.py", line 3, in <module>
    from .hookspec import hookimpl  # noqa: F401
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/plugins/hookspec.py", line 10, in <module>
    from .types import CondaSolver, CondaSubcommand, CondaVirtualPackage
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/plugins/types.py", line 6, in <module>
    from ..core.solve import Solver
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/core/solve.py", line 19, in <module>
    from .index import get_reduced_index, _supplement_index_with_system
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/core/index.py", line 15, in <module>
    from .package_cache_data import PackageCacheData
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 26, in <module>
    from .path_actions import CacheUrlAction, ExtractPackageAction
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/core/path_actions.py", line 32, in <module>
    from ..gateways.connection.download import download
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/gateways/connection/download.py", line 12, in <module>
    from .session import CondaSession
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/gateways/connection/session.py", line 11, in <module>
    from .adapters.s3 import S3Adapter
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/gateways/connection/adapters/s3.py", line 10, in <module>
    import boto3
  File "/home/jenkins/.local/lib/python3.10/site-packages/boto3/__init__.py", line 17, in <module>
    from boto3.session import Session
  File "/home/jenkins/.local/lib/python3.10/site-packages/boto3/session.py", line 17, in <module>
    import botocore.session
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/session.py", line 26, in <module>
    import botocore.client
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/client.py", line 15, in <module>
    from botocore import waiter, xform_name
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/waiter.py", line 18, in <module>
    from botocore.docs.docstring import WaiterDocstring
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/docs/__init__.py", line 15, in <module>
    from botocore.docs.service import ServiceDocumenter
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/docs/service.py", line 14, in <module>
    from botocore.docs.client import ClientDocumenter, ClientExceptionsDocumenter
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/docs/client.py", line 14, in <module>
    from botocore.docs.example import ResponseExampleDocumenter
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/docs/example.py", line 13, in <module>
    from botocore.docs.shape import ShapeDocumenter
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/docs/shape.py", line 19, in <module>
    from botocore.utils import is_json_value_header
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/utils.py", line 37, in <module>
    import botocore.httpsession
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/httpsession.py", line 46, in <module>
    from urllib3.contrib.pyopenssl import (
  File "/home/jenkins/.local/lib/python3.10/site-packages/urllib3/contrib/pyopenssl.py", line 50, in <module>
    import OpenSSL.crypto
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/OpenSSL/crypto.py", line 3268, in <module>
    _lib.OpenSSL_add_all_algorithms()
AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/jenkins/miniconda3/bin/conda", line 13, in <module>
    sys.exit(main())
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/cli/main.py", line 112, in main
    return conda_exception_handler(main, *args, **kwargs)
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1418, in conda_exception_handler
    return_value = exception_handler(func, *args, **kwargs)
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1121, in __call__
    return self.handle_exception(exc_val, exc_tb)
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1161, in handle_exception
    return self.handle_unexpected_exception(exc_val, exc_tb)
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/exceptions.py", line 1172, in handle_unexpected_exception
    self.print_unexpected_error_report(error_report)
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/exceptions.py", line ********4, in print_unexpected_error_report
    from .cli.main_info import get_env_vars_str, get_main_info_str
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/cli/main_info.py", line 17, in <module>
    from ..core.index import _supplement_index_with_system
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/core/index.py", line 15, in <module>
    from .package_cache_data import PackageCacheData
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/core/package_cache_data.py", line 26, in <module>
    from .path_actions import CacheUrlAction, ExtractPackageAction
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/core/path_actions.py", line 32, in <module>
    from ..gateways.connection.download import download
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/gateways/connection/download.py", line 12, in <module>
    from .session import CondaSession
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/gateways/connection/session.py", line 11, in <module>
    from .adapters.s3 import S3Adapter
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/conda/gateways/connection/adapters/s3.py", line 10, in <module>
    import boto3
  File "/home/jenkins/.local/lib/python3.10/site-packages/boto3/__init__.py", line 17, in <module>
    from boto3.session import Session
  File "/home/jenkins/.local/lib/python3.10/site-packages/boto3/session.py", line 17, in <module>
    import botocore.session
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/session.py", line 26, in <module>
    import botocore.client
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/client.py", line 15, in <module>
    from botocore import waiter, xform_name
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/waiter.py", line 18, in <module>
    from botocore.docs.docstring import WaiterDocstring
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/docs/__init__.py", line 15, in <module>
    from botocore.docs.service import ServiceDocumenter
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/docs/service.py", line 14, in <module>
    from botocore.docs.client import ClientDocumenter, ClientExceptionsDocumenter
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/docs/client.py", line 14, in <module>
    from botocore.docs.example import ResponseExampleDocumenter
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/docs/example.py", line 13, in <module>
    from botocore.docs.shape import ShapeDocumenter
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/docs/shape.py", line 19, in <module>
    from botocore.utils import is_json_value_header
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/utils.py", line 37, in <module>
    import botocore.httpsession
  File "/home/jenkins/.local/lib/python3.10/site-packages/botocore/httpsession.py", line 46, in <module>
    from urllib3.contrib.pyopenssl import (
  File "/home/jenkins/.local/lib/python3.10/site-packages/urllib3/contrib/pyopenssl.py", line 50, in <module>
    import OpenSSL.crypto
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/OpenSSL/__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "/home/jenkins/miniconda3/lib/python3.10/site-packages/OpenSSL/crypto.py", line 3268, in <module>
    _lib.OpenSSL_add_all_algorithms()
AttributeError: module 'lib' has no attribute 'OpenSSL_add_all_algorithms'

EnvironmentNameNotFound: Could not find conda environment: weather-routine-test
You can list all discoverable environments with `conda info --envs`.

Conda Info

Giving same error as mentioned in description

Conda Config

Giving same error as mentioned in description

Conda list

Giving same error as mentioned in description
@ShilpaJalaja ShilpaJalaja added the type::bug describes erroneous operation, use severity::* to classify the type label Jan 10, 2023
@ShilpaJalaja
Copy link
Author

ShilpaJalaja commented Jan 10, 2023

Our production job also is failing with same error

@ShilpaJalaja
Copy link
Author

Had to delete the site-packages folder of python . Then installed miniconda, and issue did not occur. Not sure , why this would work.

@travishathaway travishathaway added the source::community catch-all for issues filed by community members label Jan 19, 2023
@benbogart
Copy link

For me this began after attempting to install nbconvert and puppeteer. The error is now present in all envs including once where I did not perform this installation.

@cozcinar
Copy link

I solved the issue with pip3 install pyOpenSSL --upgrade

@jaimergp
Copy link
Contributor

Seeing this in conda/conda-libmamba-solver#133. Investigating.

@markome
Copy link

markome commented Mar 1, 2023

I solved the issue with pip3 install pyOpenSSL --upgrade

Have to run it from Anaconda prompt.

@gabrielfougeron
Copy link

Worked for me, thank you!

boasvdp referenced this issue in RIVM-bioinformatics/juno-assembly Mar 24, 2023
@Forence1999
Copy link

I solved the issue with pip3 install pyOpenSSL --upgrade

For me,
pip3 install --force-reinstall pyOpenSSL

Copy link

github-actions bot commented Jun 2, 2024

Hi there, thank you for your contribution!

This issue has been automatically marked as stale because it has not had recent activity. It will be closed automatically if no further activity occurs.

If you would like this issue to remain open please:

  1. Verify that you can still reproduce the issue at hand
  2. Comment that the issue is still reproducible and include:
    - What OS and version you reproduced the issue on
    - What steps you followed to reproduce the issue

NOTE: If this issue was closed prematurely, please leave a comment.

Thanks!

@github-actions github-actions bot added the stale [bot] marked as stale due to inactivity label Jun 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
source::community catch-all for issues filed by community members stale [bot] marked as stale due to inactivity type::bug describes erroneous operation, use severity::* to classify the type
Projects
Status: No status
Development

No branches or pull requests

8 participants