python - 在 ubuntu 中安装 gensim 错误

标签 python ubuntu gensim

我尝试使用以下命令安装 gensim:

sudo pip install gensim

我收到以下错误消息:
The directory '/home/woojung/.cache/pip/http' or its parent directory is
not owned by the current user and the cache has been disabled. Please  
check the permissions and owner of that directory. If executing pip with 
sudo, you may want sudo's -H flag.


The directory '/home/woojung/.cache/pip' or its parent directory is not 
owned by the current user and caching wheels has been disabled. check the   
permissions and owner of that directory. If executing pip with sudo, you  
may want sudo's -H flag.
Collecting gensim
Downloading gensim-2.3.0.tar.gz (17.2MB)
99% |████████████████████████████████| 17.2MB 422kB/s eta  
0:00:01Exception:
Traceback (most recent call last):
File "/home/woojung/.local/lib/python2.7/site-packages 
/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/home/woojung/.local/lib/python2.7/site-packages/pip/commands 
/install.py", line 324, in run
requirement_set.prepare_files(finder)

....


File "/home/woojung/.local/lib/python2.7/site-packages/pip/_vendor
/cachecontrol/filewrapper.py", line 50, in _close
self.__callback(self.__buf.getvalue())
File "/home/woojung/.local/lib/python2.7/site-packages/pip/_vendor
/cachecontrol/controller.py", line 275, in cache_response
self.serializer.dumps(request, response, body=body),
File "/home/woojung/.local/lib/python2.7/site-packages/pip/_vendor
/cachecontrol/serialize.py", line 87, in dumps
).encode("utf8"),
MemoryError

我安装了 numpy 和 scipy。我该如何解决这个问题?

最佳答案

不需要 sudo,然后尝试

pip --no-cache-dir install gensim

您将收到 MemoryError来自 pip,所以这不是真正的 gensim 的问题。您可以搜索类似的解决方案

关于python - 在 ubuntu 中安装 gensim 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46141998/

相关文章:

google-chrome - SSL协议(protocol)错误

python - 如何使用 Gensim Doc2vec infer_vector() 处理大型 DataFrame?

python - 在 Python 中使用 Gensim 进行主题建模

ubuntu - 在 Ubuntu 上安装 gensim 时出现 UnicodeDecodeError

python - 什么时候需要在python中使用global关键字

Python Pandas : Write certain rows in file

python - 自定义渲染器破坏站点

python - Pandas 根据其他列中的子字符串更改列值

c++ - 有没有简单的方法将 xlnt 包含到 Ubuntu 上的 Visual Studio Code 中?

c - eclipse错误找不到-l/usr/lib/gcc/x86_64-linux-gnu/4.8/include/libcrypto