简体   繁体   English

在ubuntu中安装gensim错误

[英]install gensim error in ubuntu

I trying to install gensim using the following command: 我尝试使用以下命令安装gensim:

sudo pip install gensim

I got the following error messages: 我收到以下错误消息:

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

I installed numpy and scipy. 我安装了numpy和scipy。 How can I fix this problem? 我该如何解决这个问题?

No need for sudo, and try 不需要sudo,然后尝试

pip --no-cache-dir install gensim

You're getting a MemoryError from pip, so it's not really gensim's problem. 您从pip收到了MemoryError ,所以这并不是gensim的问题。 You can search for similar solutions 您可以搜索类似的解决方案

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM