前提・実現したいこと
ファイルを実行したいです。初心者です。
anaconda prompt から atomを立ち上げています。
発生している問題・エラーメッセージ
C:\code\fx>python pred.py Traceback (most recent call last): File "pred.py", line 3, in <module> from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, roc_auc_score File "C:\Users\evrla\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\__init__.py", line 80, in <module> from .base import clone File "C:\Users\evrla\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\base.py", line 21, in <module> from .utils import _IS_32BIT File "C:\Users\evrla\AppData\Local\Programs\Python\Python38-32\lib\site-packages\sklearn\utils\__init__.py", line 20, in <module> from scipy.sparse import issparse File "C:\Users\evrla\AppData\Roaming\Python\Python38\site-packages\scipy\__init__.py", line 106, in <module> from . import _distributor_init File "C:\Users\evrla\AppData\Roaming\Python\Python38\site-packages\scipy\_distributor_init.py", line 26, in <module> WinDLL(os.path.abspath(filename)) File "C:\Users\evrla\AppData\Local\Programs\Python\Python38-32\lib\ctypes\__init__.py", line 373, in __init__ self._handle = _dlopen(self._name, mode) OSError: [WinError 193] %1 は有効な Win32 アプリケーションではありません。
該当のソースコード
import numpy as np import pandas as pd from sklearn.metrics import accuracy_score, precision_score, recall_score, f1_score, roc_auc_score import pickle from datetime import datetime import torch import torch.nn as nn import torch.nn.functional as F import torch.optim as optim import gc print("HelloWorld")
試したこと
再度torch等のインストール
補足情報(FW/ツールのバージョンなど)
C:\Users\evrla>python -V Python 3.8.3 C:\Users\evrla>pip -V pip 20.2.2 from c:\users\evrla\appdata\local\programs\python\python38-32\lib\site-packages\pip (python 3.8) C:\Users\evrla>where conda.exe where pip.exe where python.exe C:\ProgramData\Anaconda3\Scripts\conda.exe C:\Windows\System32\where.exe C:\Users\evrla\AppData\Local\Programs\Python\Python38-32\Scripts\pip.exe C:\ProgramData\Anaconda3\Scripts\pip.exe C:\Users\evrla\AppData\Local\Programs\Python\Python38-32\python.exe C:\Users\evrla\AppData\Local\Microsoft\WindowsApps\python.exe C:\ProgramData\Anaconda3\python.exe
他に困っていること
cuda11でPyTorchはビルドできるのでしょうか?
C:\Users\evrla>nvcc -V nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2020 NVIDIA Corporation Built on Wed_Jul_22_19:09:35_Pacific_Daylight_Time_2020 Cuda compilation tools, release 11.0, V11.0.221 Build cuda_11.0_bu.relgpu_drvr445TC445_37.28845127_0
「conda info」を実行すると表示される「platform」の値は何になっていますか?
```
C:\WINDOWS\system32>conda info
active environment : None
user config file : C:\Users\evrla\.condarc
populated config files : C:\Users\evrla\.condarc
conda version : 4.8.4
conda-build version : 3.18.11
python version : 3.8.3.final.0
virtual packages : __cuda=11.0
base environment : C:\ProgramData\Anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\ProgramData\Anaconda3\pkgs
C:\Users\evrla\.conda\pkgs
C:\Users\evrla\AppData\Local\conda\conda\pkgs
envs directories : C:\ProgramData\Anaconda3\envs
C:\Users\evrla\.conda\envs
C:\Users\evrla\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.8.4 requests/2.24.0 CPython/3.8.3 Windows/10 Windows/10.0.18362
administrator : True
netrc file : None
offline mode : False
```
お願いします
回答2件
あなたの回答
tips
プレビュー