首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >安装goose时出现的问题

安装goose时出现的问题
EN

Stack Overflow用户
提问于 2015-03-25 04:53:55
回答 3查看 1.6K关注 0票数 0

在安装goose时,我严格按照https://github.com/grangier/python-goose的说明进行安装,在输入"mkvirtualenv --no-site-packages goose“后,我得到的结果如下:

代码语言:javascript
复制
172-27-220-167:~ yitongwang$ mkvirtualenv --no-site-packages goose
New python executable in goose/bin/python
Installing setuptools, pip...done.
Error: deactivate must be sourced. Run 'source deactivate'
instead of 'deactivate'.
Usage: source deactivate
removes the 'bin' directory of the environment activated with 'source
activate' from PATH. 
(goose)172-27-220-167:~ yitongwang$

我已经使用'sudo pip install virtualenv/ virtualenvwrapper‘安装了virtualenv和virtualenvwrapper,最奇怪的是我似乎仍然设法进入了goose虚拟环境(看起来就是这样)。在克隆到git代码库并切换到之前克隆的python-goose目录后,我尝试运行'pip install -r requirements.txt‘和'python setup.py install',错误如下:

代码语言:javascript
复制
In file included from _imagingft.c:31:

/Users/yitongwang/anaconda/include/ft2build.h:56:10: fatal error: 'freetype/config/ftheader.h' file not found

#include <freetype/config/ftheader.h>

         ^

1 error generated.

Building using 4 processes

gcc -bundle -undefined dynamic_lookup -L/Users/yitongwang/anaconda/lib -arch x86_64 -arch x86_64 build/temp.macosx-10.5-x86_64-2.7/_imagingft.o -L/Users/yitongwang/.virtualenvs/goose/lib -L/usr/local/lib -L/usr/local/Cellar/freetype/2.5.5/lib -L/usr/lib -L/Users/yitongwang/anaconda/lib -lfreetype -o build/lib.macosx-10.5-x86_64-2.7/PIL/_imagingft.so

clang: error: no such file or directory: 'build/temp.macosx-10.5-x86_64-2.7/_imagingft.o'

error: command 'gcc' failed with exit status 1

----------------------------------------
Command "/Users/yitongwang/.virtualenvs/goose/bin/python -c "import setuptools, tokenize;__file__='/private/var/folders/64/dhzf31k50zg22rbgbz79c3dw0000gn/T/pip-build-nL0d0r/Pillow/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /var/folders/64/dhzf31k50zg22rbgbz79c3dw0000gn/T/pip-k7HUgC-record/install-record.txt --single-version-externally-managed --compile --install-headers /Users/yitongwang/.virtualenvs/goose/include/site/python2.7" failed with error code 1 in /private/var/folders/64/dhzf31k50zg22rbgbz79c3dw0000gn/T/pip-build-nL0d0r/Pillow

    In file included from _imagingft.c:31:
/Users/yitongwang/anaconda/include/ft2build.h:56:10: fatal error: 
      'freetype/config/ftheader.h' file not found
#include <freetype/config/ftheader.h>
         ^
1 error generated.
clang: error: no such file or directory: 'build/temp.macosx-10.5-x86_64-2.7/_imagingft.o'
error: Setup script exited with error: command 'gcc' failed with exit status 1

我不确定出了什么问题,因为我从头开始尝试了几次,我删除了目录'python-goose‘和'./virtualenv’以及.bash_profile中的路径。

任何帮助都将不胜感激!

谢谢

附言:我使用的是Anaconda和Python 2.7。

EN

回答 3

Stack Overflow用户

发布于 2015-03-25 08:36:36

也是同样的问题,highlighted.It与工作相关,它位于/usr/Take a look at this/ bin /virtualenvwrapper.sh中,调用deactivate,但anaconda bin目录中的脚本也做同样的事情。

票数 0
EN

Stack Overflow用户

发布于 2015-03-27 02:35:23

不使用virtualenv,而是尝试使用conda (conda create)创建一个环境,并将所有goose依赖项安装到其中(显然freetype就是其中之一)。然后将goose直接安装到该环境中。例如conda create -n goose freetype ... (将...替换为goose的other dependencies )、source activate goosepython setup.py install (来自goose目录)。

票数 0
EN

Stack Overflow用户

发布于 2017-08-11 19:15:41

在命令提示符下,输入pip install goose-提取器

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/29242677

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档