回答編集履歴

1

VMで試してみた内容を追記。

2016/07/31 11:56

投稿

flied_onion
flied_onion

スコア2604

test CHANGED
@@ -19,3 +19,153 @@
19
19
 
20
20
 
21
21
  ※ パッケージ名は`-ipap11helper`ですが、githubで例示されているのはアンダースコアなのでそのまま書いています。
22
+
23
+
24
+
25
+ ---
26
+
27
+
28
+
29
+ ### import pandasのエラーについて
30
+
31
+
32
+
33
+ 今 CentOS7(ほとんど空のもの)にpyenvからpython 2.7.5や提示されたfreezeの内容のものをいれたりしてみました(3.5.1の方は試していません)。
34
+
35
+ それで気になったんですが、ipythonが pip freezeの結果に無い様に思います。
36
+
37
+ ちなみに pipは8.1.2で _ipap11helperエラーもでていません(この辺は gikさんの環境では3.5.1の作業の影響がでていたのかもしれませんがわかりません)。
38
+
39
+
40
+
41
+ 以下がインストール作業のコマンド履歴です(検証目的だったのでVMのスナップショットとってからrootで実施してますが、実際は一般ユーザーでやった方が良いでしょう。必要に応じてsudoを付けてください)。
42
+
43
+
44
+
45
+ ```
46
+
47
+ cd /tmp
48
+
49
+ yum -y install git
50
+
51
+ yum -y groupinstall "Development Tools"
52
+
53
+ yum -y install readline-devel zlib-devel bzip2-devel sqlite-devel openssl-devel
54
+
55
+ git clone https://github.com/yyuu/pyenv.git ~/.pyenv
56
+
57
+ echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bash_profile
58
+
59
+ echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bash_profile
60
+
61
+ echo 'eval "$(pyenv init -)"' >> ~/.bash_profile
62
+
63
+ vim ~/.bash_profile
64
+
65
+ source ~/.bash_profile
66
+
67
+ exec $SHELL -l
68
+
69
+ pyenv versions
70
+
71
+ pyenv install 2.7.5
72
+
73
+ pyenv global 2.7.5
74
+
75
+ python -V
76
+
77
+ pyenv versions
78
+
79
+ yum -y install tkinter
80
+
81
+ vim requirements.txt
82
+
83
+ pip install -U -r requirements.txt
84
+
85
+ python
86
+
87
+ >>> from six.moves import tkinter as Tk
88
+
89
+ >>> exit()
90
+
91
+ python
92
+
93
+ >>> import pandas
94
+
95
+ >>> exit()
96
+
97
+ ```
98
+
99
+
100
+
101
+ `requirements.txt`
102
+
103
+ ```
104
+
105
+ cycler==0.10.0
106
+
107
+ functools32==3.2.3.post2
108
+
109
+ matplotlib==2.0.0b3
110
+
111
+ numpy==1.11.1
112
+
113
+ pandas==0.18.1
114
+
115
+ pyparsing==2.1.5
116
+
117
+ python-dateutil==2.5.3
118
+
119
+ pytz==2016.6.1
120
+
121
+ scikit-learn==0.17.1
122
+
123
+ scipy==0.18.0
124
+
125
+ six==1.10.0
126
+
127
+ subprocess32==3.2.7
128
+
129
+ ```
130
+
131
+
132
+
133
+ ipythonでも試してみました。
134
+
135
+
136
+
137
+ ```
138
+
139
+ $ pip install ipython
140
+
141
+ $ ipython
142
+
143
+ Python 2.7.5 (default, Jul 31 2016, 20:23:56)
144
+
145
+ Type "copyright", "credits" or "license" for more information.
146
+
147
+
148
+
149
+ IPython 5.0.0 -- An enhanced Interactive Python.
150
+
151
+ ? -> Introduction and overview of IPython's features.
152
+
153
+ %quickref -> Quick reference.
154
+
155
+ help -> Python's own help system.
156
+
157
+ object? -> Details about 'object', use 'object??' for extra details.
158
+
159
+
160
+
161
+ In [1]: import pandas
162
+
163
+
164
+
165
+ In [2]: exit
166
+
167
+ ```
168
+
169
+
170
+
171
+ 参考にしてみてください。