前提と実現したいこと
プログラミング、PC初心者です。
「機械学習を解釈する技術」に記載されているコードを正常に実行したいです!
(macOS Monterey 12.3
python 3.9.7)
本に記載されているコード
import sys import warnings from dataclasses import dataclass from typing import Any # 型ヒント用 from __future__ import annotations # 型ヒント用 import numpy as np import pandas as pd import matplotlib.pyplot as plt import seaborn as sns import japanize_matplotlib # matplotlibの日本語表示対応 # 自作モジュール sys.path.append("..") from mli.visualize import get_visualization_setting np.random.seed(42) pd.options.display.float_format = "{:.2f}".format sns.set(**get_visualization_setting()) warnings.simplefilter("ignore") # warningsを非表示に
記載されているコードを実行した時のエラー
ModuleNotFoundError Traceback (most recent call last) /var/folders/gr/t18r0f2934x_rfqfsphwz7180000gn/T/ipykernel_26564/3797085217.py in <module> 13 # 自作モジュール 14 sys.path.append("..") ---> 15 from mli.visualize import get_visualization_setting 16 17 np.random.seed(42) ModuleNotFoundError: No module named 'mli'
試したこと①
conda install mli
エラー①
Collecting package metadata (current_repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. Collecting package metadata (repodata.json): done Solving environment: failed with initial frozen solve. Retrying with flexible solve. PackagesNotFoundError: The following packages are not available from current channels: - mli Current channels: - https://repo.anaconda.com/pkgs/main/osx-64 - https://repo.anaconda.com/pkgs/main/noarch - https://repo.anaconda.com/pkgs/r/osx-64 - https://repo.anaconda.com/pkgs/r/noarch To search for alternate channels that may provide the conda package you're looking for, navigate to https://anaconda.org and use the search bar at the top of the page. Note: you may need to restart the kernel to use updated packages.
試したこと②
pip install mli
エラー②
ERROR: Could not find a version that satisfies the requirement mli (from versions: none) ERROR: No matching distribution found for mli Note: you may need to restart the kernel to use updated packages.
アプローチが根本的に違うような気がしますが試したことを上に残しました。kernelをrestartしても同じようなエラーが出力されます。
初心者質問で申し訳ないのですが、ご回答いただけたら幸いです!!
追記
回答1件
あなたの回答
tips
プレビュー