3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

symbol-sdk-core-python3.0.2のpipインストールエラー

Posted at

概要

  • ラズパイ環境でXYM送金のプログラムを書こうとして、SDKインストールからいきなりコケたので備忘です。

実行環境

  • OS:Raspbian GNU/Linux 10 (buster)
  • python 3.7,3
  • pip 22.0.4 from /usr/local/lib/python3.7/dist-packages/pip (python 3.7)
  • symbol-sdk-core-python 3.0.2

発生事象

pip install symbol-sdk-core-pythonで下記エラーが発生

/usr/lib/python3/dist-packages/secretstorage/dhcrypto.py:15: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
/usr/lib/python3/dist-packages/secretstorage/util.py:19: CryptographyDeprecationWarning: int_from_bytes is deprecated, use int.from_bytes instead
  from cryptography.utils import int_from_bytes
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Collecting symbol-sdk-core-python==3.0.2
  Using cached symbol-sdk-core-python-3.0.2.tar.gz (1.4 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-g97gfp6c/symbol-sdk-core-python_3e9ea494561146dfb38aa1453c23557d/setup.py", line 8, in <module>
          with open('version.txt', 'rt', encoding='utf8') as version_file:
      FileNotFoundError: [Errno 2] No such file or directory: 'version.txt'
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

回避策

  • pipコマンドの末尾に--use-deprecated=legacy-resolverを付与することでとりあえずインストールは出来た。

顛末

  • インストールは成功した者の、結果を見ると3.0.1がインストールされていた。
  • 詳細まではわからないけど、どうもpipの不具合っぽい?
  • --use-deprecated=legacy-resolverコマンドにより、旧来の依存関係解決方法にダウングレードすることで回避出来た模様。

参考ページ

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?