回答編集履歴
3
LNK1158
answer
CHANGED
@@ -16,6 +16,8 @@
|
|
16
16
|

|
17
17
|

|
18
18
|
|
19
|
+
【追記】この時に環境にあったWindows SDKをインストールしないとLNK1158でビルドに失敗することがある。
|
20
|
+
|
19
21
|
5. こんな感じにインストールされるのを待つ。
|
20
22
|

|
21
23
|
|
2
テストコマンドの編集
answer
CHANGED
@@ -19,18 +19,8 @@
|
|
19
19
|
5. こんな感じにインストールされるのを待つ。
|
20
20
|

|
21
21
|
|
22
|
-
6. 以下のよう
|
22
|
+
6. 以下のようなコマンドを実行してPythonがコンパイラを認識できることを確認する。
|
23
23
|
|
24
24
|
```
|
25
|
-
C:\Users\sakurai>python -m distutils.tests.test_msvccompiler
|
26
|
-
|
25
|
+
python -c "from distutils.ccompiler import new_compiler; compiler = new_compiler(); compiler.initialize(); print(compiler.cc)"
|
27
|
-
test_get_vc_env_unicode (__main__.msvccompilerTestCase) ... ok
|
28
|
-
test_no_compiler (__main__.msvccompilerTestCase) ... ok
|
29
|
-
test_vcruntime_copy (__main__.msvccompilerTestCase) ... ok
|
30
|
-
test_vcruntime_skip_copy (__main__.msvccompilerTestCase) ... ok
|
31
|
-
|
32
|
-
----------------------------------------------------------------------
|
33
|
-
Ran 5 tests in 6.051s
|
34
|
-
|
35
|
-
OK
|
36
26
|
```
|
1
Visual C\+\+ Build Toolsのインストール方法
answer
CHANGED
@@ -1,3 +1,36 @@
|
|
1
1
|
Anacondaは使ったことがないのでよく分からないですが、Python 3.6なら以下を入れましょう。
|
2
2
|
|
3
|
-
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
|
3
|
+
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
|
4
|
+
|
5
|
+
**~ 以下、追記 / Visual C++ Build Toolsのインストール方法 ~**
|
6
|
+
|
7
|
+
1. ブラウザで「https://www.visualstudio.com/ja/downloads/」を開く。
|
8
|
+
|
9
|
+
2. 「Build Tools for Visual Studio 2017」右側のダウンロードをクリックする。
|
10
|
+

|
11
|
+
|
12
|
+
3. ファイル名が「vs_buildtools」から始まることを確認してダウンロードして実行する。
|
13
|
+

|
14
|
+
|
15
|
+
4. ウィザードの途中で「Visual C++ Build Tools」を選択してインストールを開始する。
|
16
|
+

|
17
|
+

|
18
|
+
|
19
|
+
5. こんな感じにインストールされるのを待つ。
|
20
|
+

|
21
|
+
|
22
|
+
6. 以下のようにテストコマンドを実行して各テストをパスすることを確認する。
|
23
|
+
|
24
|
+
```
|
25
|
+
C:\Users\sakurai>python -m distutils.tests.test_msvccompiler
|
26
|
+
test_compiler_options (__main__.msvccompilerTestCase) ... ok
|
27
|
+
test_get_vc_env_unicode (__main__.msvccompilerTestCase) ... ok
|
28
|
+
test_no_compiler (__main__.msvccompilerTestCase) ... ok
|
29
|
+
test_vcruntime_copy (__main__.msvccompilerTestCase) ... ok
|
30
|
+
test_vcruntime_skip_copy (__main__.msvccompilerTestCase) ... ok
|
31
|
+
|
32
|
+
----------------------------------------------------------------------
|
33
|
+
Ran 5 tests in 6.051s
|
34
|
+
|
35
|
+
OK
|
36
|
+
```
|