質問編集履歴
2
コメントを頂いて疑問が生まれたので追記しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -32,4 +32,6 @@
|
|
32
32
|
もともとrandom.pyというファイル名で作っていて、AttributeError: partially initialized module 'random' has no attribute 'randint' (most likely due to a circular import)というエラーが発生していました。それをランダム.pyに変えましたが別のエラーが発生しました。randintとちゃんと書いているのでタイプミスではないと思います。
|
33
33
|
|
34
34
|
### 補足
|
35
|
-
(追記)pythonを実行している環境はWindows11 intel core i7 で、Visual Studio Codeを使っています。pythonのバージョンはv2024.4.1です。
|
35
|
+
(追記)pythonを実行している環境はWindows11 intel core i7 で、Visual Studio Codeを使っています。pythonのバージョンはv2024.4.1です。
|
36
|
+
|
37
|
+
(追記2)PC上にはrandom.pyが残っていますが、それではないファイル上でコードを実行しています。PC上にファイルがあるとそちらがインポートされてしまうのでしょうか?
|
1
実行環境を追記しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -32,4 +32,4 @@
|
|
32
32
|
もともとrandom.pyというファイル名で作っていて、AttributeError: partially initialized module 'random' has no attribute 'randint' (most likely due to a circular import)というエラーが発生していました。それをランダム.pyに変えましたが別のエラーが発生しました。randintとちゃんと書いているのでタイプミスではないと思います。
|
33
33
|
|
34
34
|
### 補足
|
35
|
-
|
35
|
+
(追記)pythonを実行している環境はWindows11 intel core i7 で、Visual Studio Codeを使っています。pythonのバージョンはv2024.4.1です。
|