English 中文(简体)
AttributeError: 模块校准没有特性X509_V_FLAG_CB_ISSUER CHECK
原标题:AttributeError: module lib has no attribute X509_V_FLAG_CB_ISSUER_CHECK

最近,由于腐败的迫害,我不得不重新占领沙尔。 这枚炸弹是我们的灰色炸弹之一,有以下错误:

AttributeError: module  lib  has no attribute  X509_V_FLAG_CB_ISSUER_CHECK 

导致它轰炸的法典线是:

from apiclient.discovery import build

我尝试了Pip的停机坪和Pip的升级google-api-python-client,但我似乎无法找到关于这一具体错误的任何信息。

值得一提的是,我试图通过APICA电话把谷歌:

Here is an output of the command prompt error:

  File "C:AnalyticsPuritan_GoogleAnalyticsGoogle_ConversionsmcfTest.py", line 1, in <module>
    from apiclient.discovery import build
  File "C:ProgramDataAnaconda3libsite-packagesapiclient\__init__.py", line 3, in <module>
    from googleapiclient import channel, discovery, errors, http, mimeparse, model
  File "C:ProgramDataAnaconda3libsite-packagesgoogleapiclientdiscovery.py", line 57, in <module>
    from googleapiclient import _auth, mimeparse
  File "C:ProgramDataAnaconda3libsite-packagesgoogleapiclient\_auth.py", line 34, in <module>
    import oauth2client.client
  File "C:ProgramDataAnaconda3libsite-packagesoauth2clientclient.py", line 45, in <module>
    from oauth2client import crypt
  File "C:ProgramDataAnaconda3libsite-packagesoauth2clientcrypt.py", line 45, in <module>
    from oauth2client import _openssl_crypt
  File "C:ProgramDataAnaconda3libsite-packagesoauth2client\_openssl_crypt.py", line 16, in <module>
    from OpenSSL import crypto
  File "C:ProgramDataAnaconda3libsite-packagesOpenSSL\__init__.py", line 8, in <module>
    from OpenSSL import crypto, SSL
  File "C:ProgramDataAnaconda3libsite-packagesOpenSSLcrypto.py", line 1517, in <module>
    class X509StoreFlags(object):
  File "C:ProgramDataAnaconda3libsite-packagesOpenSSLcrypto.py", line 1537, in X509StoreFlags
    CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK
AttributeError: module  lib  has no attribute  X509_V_FLAG_CB_ISSUER_CHECK 
最佳回答

Edit the codeo.py file referred in the acktrace,并通过用#号评论删除了犯罪线。

然后更新PyOpenSSL的最新版本。

pip install pip --upgrade
pip install pyopenssl --upgrade

现在,你可以再次接过评论线,应该工作。

问题回答

I also encountered this error while installing Flask and firebase-admin on Ubuntu 20.04. The following commands solved my problem. First I removed OpenSSL using this command.

sudo rm -rf /usr/lib/python3/dist-packages/OpenSSL
sudo pip3 install pyopenssl
sudo pip3 install pyopenssl --upgrade
pip3 install pyOpenSSL --upgrade

我的所有问题都得到解决。

sudo apt remove python3-openssl

对我来说,先前的回答可以帮助我,因为我会为所有平线指挥部,甚至<代码>pip3 -V。 但我通过:

  1. 查阅 https://pypi.org/project/pyOpenSSL/#files 。 如果需要最新版本的话。

    wget https://files.pythonhosted.org/packages/00/3f/ea5cfb789dddb327e6d2cf9377c36d9d8607af85530af0e7001165587ae7/pyOpenSSL-22.1.0-py3-none-any.whl
    
  2. Install pyOpenSSL from the wheel file.

    python3 -m easy_install pyOpenSSL-22.1.0-py3-none-any.whl
    

http://askubuntu.com/questions/1428181/module-lib-has-no-attribute-x509-v-flag-cb-issuer-check/1429674#1429674”

今天上午,我在系统更新和重新启用后试图安装 we,陷入了这一问题。 评论载有内容的内容

X509_V_FLAG_CB_ISSUER_CHECK

/usr/lib/python3/dist- Packages/OpenSSL/codeo.py 造成进一步错误

AttributeError: module  lib  has no attribute  OpenSSL_add_all_algorithms 

None of the suggested fixes would work for me.

  • sudo apt remove python3-pip followed by sudo apt install python3-pip
  • sudo pip install pyopenssl --upgrade
  • sudo python3 -m easy_install pyOpenSSL-22.0.0-py2.py3-none-any.whl
  • sudo pip install --force-reinstall "cryptography==38.0.4"

我发现,module lib没有属性X509_V_FLAG_CBER_CHECK ,但它没有增加我已经知道的任何东西。 我发现。 附录 误差:模块校准没有属性 OpenSSL_add_all_algorithms ,但与WARNINGS接触,供上台的人使用,并引起重大的系统广泛问题。

我试图通过简便地提升开放式特别安全局,但无法找到轮椅,并发出折旧警告。 最后,我回过来回头来谈谈“Alexandr”的评论,他说,他刚刚用护堤拆除了开放式特别安全局。

sudo rm -rf /usr/lib/python3/dist-packages/OpenSSL

我在此试图重新加入开放式特别安全局,但发现它已经获得认可。 难道一个老的一揽子计划会受阻,这是问题的根源吗?

sudo pip install pyopenssl
Requirement already satisfied: pyopenssl in /usr/lib/python3/dist-packages (19.0.0)

然后,我提升了Pip,并安装了WeasyPrint,我希望证实我已经解决这个问题。

pip install pip --upgrade
Successfully installed pip-22.3.1

pip install weasyprint
Successfully installed Pyphen-0.13.2 ... weasyprint-57.2 zopfli-0.2.2

以下指挥为我工作......

sudo pip3 install pyopenssl

sudo pip3 install pyopenssl --upgrade

如果你在使用皮条时发现这一错误,就会这样做:

rm -rf <python_path>/site-packages/OpenSSL

这个问题将得到解决。

I ve 试图提升pip并安装另一个版本的“密码>pyO开放式SSL>/密码。 从轮椅的档案中可以找到,但那是干的。 唯一能够帮助拆除了开放式特别安全单元的整整条手套,如: 页: 1

如果你完全破碎,正如@sgdesmet在评论中提议的那样,解决这一问题的唯一选择是:

“通过对密码进行评论,删除犯罪线”

没有任何其他解决办法与我合作。

If you don t have sudo rights the --user option might do the trick:

wget https://bootstrap.pypa.io/get-pip.py && python3 get-pip.py --user
python3 -m pip install pyopenssl --upgrade --user

I got the same issue using Certbot, the right version was not the latest, so : pip3 install pyOpenSSL==23.1.1

如果pip/code>/pip3被完全破碎,其他选择工作(如@DarkSkull所述)则.py文档中造成这一问题的内容必须删除或评论。

此处为自动处理方式:

python_openssl_crypto_file="/usr/lib/python3/dist-packages/OpenSSL/crypto.py"
search_term="CB_ISSUER_CHECK = _lib.X509_V_FLAG_CB_ISSUER_CHECK"
cb_issuer_check_line_number="$(awk "/$search_term/ {print FNR}" $python_openssl_crypto_file)"
sed -i "${cb_issuer_check_line_number}s/.*/    # $search_term/" $python_openssl_crypto_file

由于上述答复,我得以解决同样的问题。 我利用管道管理我的环境。 这个问题是在更新我的密码模块之后产生的。

The fix (for me):

pipenv update pyOpenSSL

对我来说,问题通过将雪面粉-电离线-平线包装版本从2.7.1改为最新版本的要求加以解决。 txt file « app.

The issue in this case was an unneeded OpenSSL installed that made the conflict and broke/block pip. The problem was solved when manual deleting the OpenSSL folder within site-packages folder.

For example, I deleted this folder in venv: venv/bin/python3.8/site-packages/OpenSSL

And fixed the pip issue globally: usr/lib/python3.8/site-packages/OpenSSL

注:我发现,由于这一错误,粉碎了,无法安装或拆除。 在这项解决办法之后,我可以安装新的包裹和进口包,安装新包。





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...