回答編集履歴
3
LNK1158
test
CHANGED
@@ -34,6 +34,10 @@
|
|
34
34
|
|
35
35
|
|
36
36
|
|
37
|
+
【追記】この時に環境にあったWindows SDKをインストールしないとLNK1158でビルドに失敗することがある。
|
38
|
+
|
39
|
+
|
40
|
+
|
37
41
|
5. こんな感じにインストールされるのを待つ。
|
38
42
|
|
39
43
|
![BuildTools](2ab5e0584dc95d077b7b1626c188343c.png)
|
2
テストコマンドの編集
test
CHANGED
@@ -40,32 +40,12 @@
|
|
40
40
|
|
41
41
|
|
42
42
|
|
43
|
-
6. 以下のよう
|
43
|
+
6. 以下のようなコマンドを実行してPythonがコンパイラを認識できることを確認する。
|
44
44
|
|
45
45
|
|
46
46
|
|
47
47
|
```
|
48
48
|
|
49
|
-
C:\Users\sakurai>python -m distutils.tests.test_msvccompiler
|
50
|
-
|
51
|
-
t
|
49
|
+
python -c "from distutils.ccompiler import new_compiler; compiler = new_compiler(); compiler.initialize(); print(compiler.cc)"
|
52
|
-
|
53
|
-
test_get_vc_env_unicode (__main__.msvccompilerTestCase) ... ok
|
54
|
-
|
55
|
-
test_no_compiler (__main__.msvccompilerTestCase) ... ok
|
56
|
-
|
57
|
-
test_vcruntime_copy (__main__.msvccompilerTestCase) ... ok
|
58
|
-
|
59
|
-
test_vcruntime_skip_copy (__main__.msvccompilerTestCase) ... ok
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
----------------------------------------------------------------------
|
64
|
-
|
65
|
-
Ran 5 tests in 6.051s
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
OK
|
70
50
|
|
71
51
|
```
|
1
Visual C\+\+ Build Toolsのインストール方法
test
CHANGED
@@ -3,3 +3,69 @@
|
|
3
3
|
|
4
4
|
|
5
5
|
https://wiki.python.org/moin/WindowsCompilers#Microsoft_Visual_C.2B-.2B-_14.0_standalone:_Build_Tools_for_Visual_Studio_2017_.28x86.2C_x64.2C_ARM.2C_ARM64.29
|
6
|
+
|
7
|
+
|
8
|
+
|
9
|
+
**~ 以下、追記 / Visual C++ Build Toolsのインストール方法 ~**
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
1. ブラウザで「https://www.visualstudio.com/ja/downloads/」を開く。
|
14
|
+
|
15
|
+
|
16
|
+
|
17
|
+
2. 「Build Tools for Visual Studio 2017」右側のダウンロードをクリックする。
|
18
|
+
|
19
|
+
![Build Tools for Visual Studio 2017.PNG](bca255320c576dc3e6217c984b7839a2.png)
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
3. ファイル名が「vs_buildtools」から始まることを確認してダウンロードして実行する。
|
24
|
+
|
25
|
+
![vs_buildtools__35187572.1495092537.exe.png](c0d41623f826951bd699f6837d41bfd1.png)
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
4. ウィザードの途中で「Visual C++ Build Tools」を選択してインストールを開始する。
|
30
|
+
|
31
|
+
![Visual C++ Build Tools.png](99f0e437c172cf7e11d5e1d2636fac63.png)
|
32
|
+
|
33
|
+
![Visual C++ Build Tools Overview.png](a1f096715ea1c1b925be01e3460330c6.png)
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
5. こんな感じにインストールされるのを待つ。
|
38
|
+
|
39
|
+
![BuildTools](2ab5e0584dc95d077b7b1626c188343c.png)
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
6. 以下のようにテストコマンドを実行して各テストをパスすることを確認する。
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
```
|
48
|
+
|
49
|
+
C:\Users\sakurai>python -m distutils.tests.test_msvccompiler
|
50
|
+
|
51
|
+
test_compiler_options (__main__.msvccompilerTestCase) ... ok
|
52
|
+
|
53
|
+
test_get_vc_env_unicode (__main__.msvccompilerTestCase) ... ok
|
54
|
+
|
55
|
+
test_no_compiler (__main__.msvccompilerTestCase) ... ok
|
56
|
+
|
57
|
+
test_vcruntime_copy (__main__.msvccompilerTestCase) ... ok
|
58
|
+
|
59
|
+
test_vcruntime_skip_copy (__main__.msvccompilerTestCase) ... ok
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
----------------------------------------------------------------------
|
64
|
+
|
65
|
+
Ran 5 tests in 6.051s
|
66
|
+
|
67
|
+
|
68
|
+
|
69
|
+
OK
|
70
|
+
|
71
|
+
```
|