teratail header banner
teratail header banner
質問するログイン新規登録

質問編集履歴

4

調査追加

2019/11/20 03:30

投稿

pokemonta
pokemonta

スコア170

title CHANGED
File without changes
body CHANGED
@@ -57,4 +57,12 @@
57
57
  pip 19.3.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)
58
58
 
59
59
  [ec2-user]$ python -c 'import sys; print(sys.base_prefix)'
60
- /home/ec2-user/.pyenv/versions/3.7.2
60
+ /home/ec2-user/.pyenv/versions/3.7.2
61
+
62
+ 11/20 さらに調査実施
63
+ [ec2-user]$ pip list | grep urllib
64
+ DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
65
+ urllib3 1.25.7
66
+ [ec2-user]$ pip list | grep chardet
67
+ DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
68
+ chardet 3.0.4

3

調査結果修正

2019/11/20 03:30

投稿

pokemonta
pokemonta

スコア170

title CHANGED
File without changes
body CHANGED
@@ -48,7 +48,13 @@
48
48
  11/20 同件の調査を実施
49
49
  https://teratail.com/questions/169266
50
50
  こんなのがわかりましたが何を具体的にすればよいか不明
51
+
52
+ [ec2-user]$ python -c 'import urllib3, chardet; print(urllib3.__file__); print(chardet.__file__)'
53
+ /home/ec2-user/.pyenv/versions/3.7.2/lib/python3.7/site-packages/urllib3/__init__.py
54
+ /home/ec2-user/.pyenv/versions/3.7.2/lib/python3.7/site-packages/chardet/__init__.py
55
+
51
56
  [ec2-user]$ pip -V
52
57
  pip 19.3.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)
58
+
53
59
  [ec2-user]$ python -c 'import sys; print(sys.base_prefix)'
54
60
  /home/ec2-user/.pyenv/versions/3.7.2

2

追加の調査実施

2019/11/20 03:26

投稿

pokemonta
pokemonta

スコア170

title CHANGED
File without changes
body CHANGED
@@ -16,21 +16,21 @@
16
16
  python-urllib3-1.24.3-1.amzn2.0.1.noarch : Python HTTP library with thread-safe connection pooling and file post
17
17
 
18
18
  ※インストールできるパッケージがないか調査②
19
- [ec2-user@ip-10-1-2-11 EdgeSimpleJoinTest]$ sudo yum --showduplicates search chardet
19
+ [ec2-user]$ sudo yum --showduplicates search chardet
20
20
  Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
21
21
  ====================================================== N/S matched: chardet =======================================================
22
22
  python-chardet-2.2.1-1.amzn2.noarch : Character encoding auto-detection in Python
23
23
  python-chardet-2.2.1-1.amzn2.noarch : Character encoding auto-detection in Python
24
24
 
25
25
  どちらもinstalled状態であり、エラー解消にはつながりませんでした。
26
- [ec2-user@ip-10-1-2-11 EdgeSimpleJoinTest]$ sudo yum install python-urllib3-1.24.3-1.amzn2.0.1.noarch
26
+ [ec2-user]$ sudo yum install python-urllib3-1.24.3-1.amzn2.0.1.noarch
27
27
  Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
28
28
  amzn2-core | 2.4 kB 00:00:00
29
29
  Package python-urllib3-1.24.3-1.amzn2.0.1.noarch already installed and latest version
30
30
  Nothing to do
31
31
 
32
32
  こんなことも試しました。
33
- [ec2-user@ip-10-1-2-11 EdgeSimpleJoinTest]$ python -m pip install "urllib3<1.25".
33
+ [ec2-user]$ python -m pip install "urllib3<1.25".
34
34
  /home/ec2-user/.pyenv/versions/3.7.2/bin/python: No module named pip.__main__; 'pip' is a package and cannot be directly executed
35
35
 
36
36
  下記記載の方法を実施するも効果なし
@@ -39,8 +39,16 @@
39
39
  sudo pip install --upgrade requests
40
40
 
41
41
  pipのバージョンを上げてからurllib3をimportするとpipがバグります
42
- [ec2-user@ip-10-1-2-11 EdgeSimpleJoinTest]$ pip install --upgrade --user pip==19.3.1
42
+ [ec2-user]$ pip install --upgrade --user pip==19.3.1
43
- [ec2-user@ip-10-1-2-11 EdgeSimpleJoinTest]$ pip install --upgrade --user urllib3==1.24.3
43
+ [ec2-user]$ pip install --upgrade --user urllib3==1.24.3
44
44
  Traceback (most recent call last):
45
45
  File "/home/ec2-user/.pyenv/versions/3.7.2/bin/pip", line 11, in <module>
46
- sys.exit(main())
46
+ sys.exit(main())
47
+
48
+ 11/20 同件の調査を実施
49
+ https://teratail.com/questions/169266
50
+ こんなのがわかりましたが何を具体的にすればよいか不明
51
+ [ec2-user]$ pip -V
52
+ pip 19.3.1 from /usr/lib/python2.7/site-packages/pip (python 2.7)
53
+ [ec2-user]$ python -c 'import sys; print(sys.base_prefix)'
54
+ /home/ec2-user/.pyenv/versions/3.7.2

1

指摘に対して補足説明

2019/11/20 02:55

投稿

pokemonta
pokemonta

スコア170

title CHANGED
File without changes
body CHANGED
@@ -1,6 +1,12 @@
1
- urllib3 (1.24.3) or chardet (3.0.4) doesn't match a supported versionが表示れる
1
+ pytestを使って、jsonファイルをdynamoDBにロードせていますこの時に以下のようなエラーがでます。
2
- この事象を解決する方法をご教示願います。
3
2
 
3
+ urllib3 (1.24.3) or chardet (3.0.4) doesn't match a supported version
4
+
5
+ pytestにはいくつか引数があり、pgmをキックしているようですが全く読めません。
6
+ 同じような方式で引数が別pgm、別json、別dynamoのときはロードできています。
7
+ やり方は間違っていません。pgmによってパッケージのバージョンが違うのでダウングレードもしくはアップデートが必要ではないかとよんでいます。 ちなみにanacondaは入れていません。
8
+
9
+ ※インストールできるパッケージがないか調査①
4
10
  ec2-user@ip-10-1-2-11 EdgeSimpleJoinTest]$ sudo yum --showduplicates search urllib
5
11
  Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
6
12
  ======================================================= N/S matched: urllib =======================================================
@@ -9,13 +15,14 @@
9
15
  python-urllib3-1.24.3-1.amzn2.0.1.noarch : Python HTTP library with thread-safe connection pooling and file post
10
16
  python-urllib3-1.24.3-1.amzn2.0.1.noarch : Python HTTP library with thread-safe connection pooling and file post
11
17
 
18
+ ※インストールできるパッケージがないか調査②
12
19
  [ec2-user@ip-10-1-2-11 EdgeSimpleJoinTest]$ sudo yum --showduplicates search chardet
13
20
  Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
14
21
  ====================================================== N/S matched: chardet =======================================================
15
22
  python-chardet-2.2.1-1.amzn2.noarch : Character encoding auto-detection in Python
16
23
  python-chardet-2.2.1-1.amzn2.noarch : Character encoding auto-detection in Python
17
24
 
18
- installed状態でありアップ出来い模様
25
+ どちらもinstalled状態であり、エラー解消にはがりませんでした。
19
26
  [ec2-user@ip-10-1-2-11 EdgeSimpleJoinTest]$ sudo yum install python-urllib3-1.24.3-1.amzn2.0.1.noarch
20
27
  Loaded plugins: extras_suggestions, langpacks, priorities, update-motd
21
28
  amzn2-core | 2.4 kB 00:00:00