小编tom*_*oka的帖子

ImportError:无法导入名称_imaging

我安装了Pillow,之后我想做:

from PIL import Image
Run Code Online (Sandbox Code Playgroud)

我收到以下错误:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/usr/local/lib/python2.7/dist-packages/PIL/Image.py", line 61, in <module>
ImportError: cannot import name _imaging
Run Code Online (Sandbox Code Playgroud)

但是,如果我单独导入这些,一切都很好,即:

import _imaging
import Image
Run Code Online (Sandbox Code Playgroud)

你知道问题可能是什么吗?

python django imaging python-imaging-library pillow

19
推荐指数
4
解决办法
3万
查看次数

未找到架构 x86_64 的符号 - Cmake - Mac sierra

最近我开始了一个 C++ 的新项目。问题是,当我尝试编译它时,出现链接错误。我今天花了一整天的时间尝试调试它,但我并没有真正在任何地方找到好的解决方案。如果有人能帮忙那就太好了。我使用的是 Mac Sierra。

parsing/methylation.h

#ifndef EPIRL_METHYLATION_H
#define EPIRL_METHYLATION_H

#include <stdio.h>
#include <iostream>
#include <fstream>
#include <vector>
#include <sstream>

using namespace std;

namespace methylation {
    struct MethLine {
        string chr;
        int coord;
        char strand;
        int methylated;
        int un_methylated;
        string context;
        string tag;
    };

    string calculateMethylationByContext(
            MethLine m_input[], int length,
            int window_start, int window_end, int threshold);

    void calculateMethylation(
        const istream &methylation_stream,
        const istream &coordinate_stream,
        const ostream &output_stream
    );
}

#endif //EPIRL_METHYLATION_H
Run Code Online (Sandbox Code Playgroud)

parsing/methylation.cpp

#include "methylation.h"

namespace methylation {
    string calculateMethylationByContext(
            MethLine …
Run Code Online (Sandbox Code Playgroud)

c++ cmake linkage undefined-symbol

8
推荐指数
2
解决办法
2万
查看次数

理解LISP中的"let"表达

我是lisp的新手,之前有过函数式编程(Haskell,SML)的经验.为什么这段代码会返回14,而不是10(即1 + 2y + 3 + 1)?

(defvar x 1)

(defun g (z)
  (+ x z))

(defun f (y)
  (+ (g 1)
     (let ((x (+ y 3)))
        (g (+ y x)))))

(f 2)
Run Code Online (Sandbox Code Playgroud)

lisp common-lisp let

5
推荐指数
1
解决办法
1537
查看次数