質問編集履歴
1
やってみたこと追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -71,3 +71,161 @@
|
|
71
71
|
Python 3.8
|
72
72
|
|
73
73
|
(Python を起動するとPython 3.7.4 (default, Aug 9 2019, 18:34:13) [MSC v.1915 64 bit (AMD64)] :: Anaconda, Inc. on win32 とでる)
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
##やってみたこと(3/24追加)
|
78
|
+
|
79
|
+
仮想環境を変えてみた
|
80
|
+
|
81
|
+
```ここに言語を入力
|
82
|
+
|
83
|
+
(base) C:\Users\myname\workspace>conda activate test1
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
(test1) C:\Users\myname\workspace>conda list
|
88
|
+
|
89
|
+
# packages in environment at C:\Users\myname\Anaconda3\envs\test1:
|
90
|
+
|
91
|
+
#
|
92
|
+
|
93
|
+
# Name Version Build Channel
|
94
|
+
|
95
|
+
blas 1.0 mkl
|
96
|
+
|
97
|
+
ca-certificates 2020.1.1 0
|
98
|
+
|
99
|
+
certifi 2019.11.28 py37_1
|
100
|
+
|
101
|
+
cycler 0.10.0 py37_0
|
102
|
+
|
103
|
+
freetype 2.9.1 ha9979f8_1
|
104
|
+
|
105
|
+
icc_rt 2019.0.0 h0cc432a_1
|
106
|
+
|
107
|
+
icu 58.2 ha66f8fd_1
|
108
|
+
|
109
|
+
intel-openmp 2020.0 166
|
110
|
+
|
111
|
+
jpeg 9b hb83a4c4_2
|
112
|
+
|
113
|
+
kiwisolver 1.1.0 py37ha925a31_0
|
114
|
+
|
115
|
+
libpng 1.6.37 h2a8f88b_0
|
116
|
+
|
117
|
+
matplotlib 3.1.3 py37_0
|
118
|
+
|
119
|
+
matplotlib-base 3.1.3 py37h64f37c6_0
|
120
|
+
|
121
|
+
mkl 2020.0 166
|
122
|
+
|
123
|
+
mkl-service 2.3.0 py37hb782905_0
|
124
|
+
|
125
|
+
mkl_fft 1.0.15 py37h14836fe_0
|
126
|
+
|
127
|
+
mkl_random 1.1.0 py37h675688f_0
|
128
|
+
|
129
|
+
numpy 1.18.1 py37h93ca92e_0
|
130
|
+
|
131
|
+
numpy-base 1.18.1 py37hc3f5095_1
|
132
|
+
|
133
|
+
openssl 1.1.1e he774522_0
|
134
|
+
|
135
|
+
pip 20.0.2 py37_1
|
136
|
+
|
137
|
+
pyparsing 2.4.6 py_0
|
138
|
+
|
139
|
+
pyqt 5.9.2 py37h6538335_2
|
140
|
+
|
141
|
+
python 3.7.6 h60c2a47_2
|
142
|
+
|
143
|
+
python-dateutil 2.8.1 py_0
|
144
|
+
|
145
|
+
qt 5.9.7 vc14h73c81de_0
|
146
|
+
|
147
|
+
setuptools 46.1.1 py37_0
|
148
|
+
|
149
|
+
sip 4.19.8 py37h6538335_0
|
150
|
+
|
151
|
+
six 1.14.0 py37_0
|
152
|
+
|
153
|
+
sqlite 3.31.1 he774522_0
|
154
|
+
|
155
|
+
tornado 6.0.4 py37he774522_1
|
156
|
+
|
157
|
+
vc 14.1 h0510ff6_4
|
158
|
+
|
159
|
+
vs2015_runtime 14.16.27012 hf0eaf9b_1
|
160
|
+
|
161
|
+
wheel 0.34.2 py37_0
|
162
|
+
|
163
|
+
wincertstore 0.2 py37_0
|
164
|
+
|
165
|
+
zlib 1.2.11 h62dcd97_3
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
(test1) C:\Users\myname\workspace>pyplot_label_title.py
|
170
|
+
|
171
|
+
Traceback (most recent call last):
|
172
|
+
|
173
|
+
File "C:\Users\myname\workspace\Python3_sample\Python3_sample\Part3\Chapter14\Section14-1\pyplot_label_title.py", line 1, in <module>
|
174
|
+
|
175
|
+
import matplotlib.pyplot as plt
|
176
|
+
|
177
|
+
ModuleNotFoundError: No module named 'matplotlib'
|
178
|
+
|
179
|
+
```
|
180
|
+
|
181
|
+
######sys.pathを実行
|
182
|
+
|
183
|
+
実行したコード
|
184
|
+
|
185
|
+
```ここに言語を入力
|
186
|
+
|
187
|
+
import sys
|
188
|
+
|
189
|
+
print(sys.path)
|
190
|
+
|
191
|
+
```
|
192
|
+
|
193
|
+
結果
|
194
|
+
|
195
|
+
```ここに言語を入力
|
196
|
+
|
197
|
+
(base) C:\Users\myname\workspace>sys.py
|
198
|
+
|
199
|
+
['C:\Users\myname\workspace', 'C:\Users\myname\AppData\Local\Programs\Python\Python37\python37.zip', 'C:\Users\myname\AppData\Local\Programs\Python\Python37\DLLs', 'C:\Users\myname\AppData\Local\Programs\Python\Python37\lib', 'C:\Users\myname\AppData\Local\Programs\Python\Python37', 'C:\Users\myname\AppData\Local\Programs\Python\Python37\lib\site-packages']
|
200
|
+
|
201
|
+
```
|
202
|
+
|
203
|
+
(これが原因でしょうか?)
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
Pythonを起動した状態で
|
208
|
+
|
209
|
+
```ここに言語を入力
|
210
|
+
|
211
|
+
(base) C:\Users\myname\workspace>python
|
212
|
+
|
213
|
+
Python 3.7.6 (default, Jan 8 2020, 20:23:39) [MSC v.1916 64 bit (AMD64)] :: Anaconda, Inc. on win32
|
214
|
+
|
215
|
+
Type "help", "copyright", "credits" or "license" for more information.
|
216
|
+
|
217
|
+
>>> import sys
|
218
|
+
|
219
|
+
>>> sys.path
|
220
|
+
|
221
|
+
['', 'C:\Users\myname\Anaconda3\python37.zip'
|
222
|
+
|
223
|
+
, 'C:\Users\myname\Anaconda3\DLLs', 'C:\Users\myname\Anaconda3\lib'
|
224
|
+
|
225
|
+
, 'C:\Users\myname\Anaconda3', 'C:\Users\myname\Anaconda3\lib\site-packages'
|
226
|
+
|
227
|
+
, 'C:\Users\myname\Anaconda3\lib\site-packages\win32', 'C:\Users\shungo\Anaconda3\lib\site-packages\win32\lib'
|
228
|
+
|
229
|
+
, 'C:\Users\myname\Anaconda3\lib\site-packages\Pythonwin']
|
230
|
+
|
231
|
+
```
|