ImportError: No module named py31compat

后端 未结 4 1844
深忆病人
深忆病人 2021-01-24 04:03

i am trying to install gensim using

sudo -H pip install --upgrade gensim

but it is giving me this error :

  File \"setup.py\",         


        
4条回答
  •  梦谈多话
    2021-01-24 04:35

    I encountered a very similar error upon an Ansible run of a refactored OpenShift playbook. The error was discovered once all of the plays were parsed.

    "ERROR! Unexpected Exception, this is probably a bug: cannot import name py31compat"

    I am using ...

    • Ansible 2.5.3
    • Python2-2.7.15

    I ran the following command to list the location of all of the packages and libraries associated with Python 2. I checked available paths to ensure I had one version of Ansible and one copy of each package installed.

    $ python -c 'import sys; print sys.path'

    'py31compat' is not a separate module one can download. It is included with the Setuptools package. It was determined I had two packages installed of different versions, both out-of-date. I uninstalled both via pip and installed the latest setuptools version available. No luck.

    My solution was to uninstall Ansible and reinstall the same version. This resolved the issue.

提交回复
热议问题