Gensim安装问题

VJu*_*une 8 python pip gensim

我正在尝试使用以下方法在Google云端实例上安装gensim:

pip3安装gensim

这是我尝试导入gensim时的堆栈跟踪:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python3.4/dist-packages/gensim/__init__.py", line 6, in <module>
    from gensim import parsing, matutils, interfaces, corpora, models, similarities, summarization
  File "/usr/local/lib/python3.4/dist-packages/gensim/models/__init__.py", line 7, in <module>
    from .coherencemodel import CoherenceModel
  File "/usr/local/lib/python3.4/dist-packages/gensim/models/coherencemodel.py", line 30, in <module>
    from gensim.models.wrappers import LdaVowpalWabbit, LdaMallet
  File "/usr/local/lib/python3.4/dist-packages/gensim/models/wrappers/__init__.py", line 5, in <module>
    from .ldamallet import LdaMallet
  File "/usr/local/lib/python3.4/dist-packages/gensim/models/wrappers/ldamallet.py", line 43, in <module>
    from smart_open import smart_open
  File "/usr/local/lib/python3.4/dist-packages/smart_open/__init__.py", line 1, in <module>
    from .smart_open_lib import *
  File "/usr/local/lib/python3.4/dist-packages/smart_open/smart_open_lib.py", line 36, in <module>
    import boto.s3.key
  File "/usr/local/lib/python3.4/dist-packages/boto/s3/key.py", line 33, in <module>
    import boto.utils
  File "/usr/local/lib/python3.4/dist-packages/boto/__init__.py", line 1216, in <module>
    boto.plugin.load_plugins(config)
AttributeError: 'module' object has no attribute 'plugin'
Run Code Online (Sandbox Code Playgroud)

这是linux版本(lsb_release -a的输出):

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 8.6 (jessie)
Release:    8.6
Codename:   jessie
Run Code Online (Sandbox Code Playgroud)

这是输出

pip3冻结

Cython==0.25.1
Flask==0.11.1
Jinja2==2.8
MarkupSafe==0.23
Pillow==2.6.1
Werkzeug==0.11.11
beautifulsoup4==4.3.2
boto==2.43.0
bz2file==0.98
chardet==2.3.0
click==6.6
colorama==0.3.2
decorator==3.4.0
gensim==0.13.3
html5lib==0.999
itsdangerous==0.24
lxml==3.4.0
matplotlib==1.4.2
nltk==3.2.1
nose==1.3.4
numexpr==2.4
numpy==1.11.2
pandas==0.14.1
pyparsing==2.0.3
python-apt==0.9.3.12
python-dateutil==2.2
pytz==2012c
requests==2.4.3
scipy==0.14.0
six==1.8.0
smart-open==1.3.5
stop-words==2015.2.23.1
tables==3.1.1
unattended-upgrades==0.1
urllib3==1.9.1
wheel==0.24.0
Run Code Online (Sandbox Code Playgroud)

任何人都可以指点我!这非常令人沮丧.

Adr*_*oer 19

有同样的问题,以防万一有人偶然发现:GCE以某种方式被打破

pip install google-compute-engine

来自https://github.com/GoogleCloudPlatform/compute-image-packages/issues/262

作品


VJu*_*une 2

修复:

sudo pip3 卸载 boto

须藤 pip3 安装 boto

这似乎是谷歌计算云的事情。