0
0

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 5 years have passed since last update.

cygwin の virtualenv 環境で resource temporarily unavailable エラーになる時の対処

Last updated at Posted at 2019-05-10

cygwin で,Python の virtualenv 環境を構築して,flask をインストールしようと pip コマンドを打ったら,resource temporarily unavailable エラーになった.昔は時々このエラーを見たが,この頃はcygwin setup が rebaseall をやってくれるので起こらないはず,と思っていたのだが.
調べてみたら,stackoverflow に詳しい回答 があった.virtualenv がコピーしたライブラリ (や,pipがインストールしたライブラリ) にはrebaseがかかっていない,ということである.そう言われれば当たり前だ...
ということで,そこに書いてある通りにすれば解決するのだが,手順だけ下に抜き出しておく.背景まで詳しく説明されていて,回答のお手本のようにも思えるのだが,よく読まないとどれが手順だかわかりにくいので.

1. 対象とするライブラリのリストを作成する.

virtualenv環境のディレクトリが ${HOME}/myenv だとして,

find ${HOME}/myenv -name "*.dll" -o -name "*.so" > /tmp/to_rebase.txt
2. すべてのcygwinプログラムを閉じる.

サービスも含む.

3. rebaseall

Windows のエクスプローラで cygwin の bin フォルダを開き,dash.exe をダブルクリックして起動し,以下を実行する.

/bin/rebaseall -v -T /tmp/to_rebase.txt

以上.

最初におこった resource temporarily unavailable のエラーを貼っておく.

      0 [main] python3.6 831 child_info_fork::abort: address space needed by 'libpython3.6m.dll' (0x400000) is already occupied
Collecting flask
  Using cached https://files.pythonhosted.org/packages/7f/e7/08578774ed4536d3242b14dacb4696386634607af824ea997202cd0edb4b/Flask-1.0.2-py2.py3-none-any.whl
Collecting Jinja2>=2.10 (from flask)
  Using cached https://files.pythonhosted.org/packages/1d/e7/fd8b501e7a6dfe492a433deb7b9d833d39ca74916fa8bc63dd1a4947a671/Jinja2-2.10.1-py2.py3-none-any.whl
Collecting itsdangerous>=0.24 (from flask)
  Using cached https://files.pythonhosted.org/packages/76/ae/44b03b253d6fade317f32c24d100b3b35c2239807046a4c953c7b89fa49e/itsdangerous-1.1.0-py2.py3-none-any.whl
Collecting Werkzeug>=0.14 (from flask)
  Using cached https://files.pythonhosted.org/packages/18/79/84f02539cc181cdbf5ff5a41b9f52cae870b6f632767e43ba6ac70132e92/Werkzeug-0.15.2-py2.py3-none-any.whl
Collecting click>=5.1 (from flask)
  Using cached https://files.pythonhosted.org/packages/fa/37/45185cb5abbc30d7257104c434fe0b07e5a195a6847506c074527aa599ec/Click-7.0-py2.py3-none-any.whl
Collecting MarkupSafe>=0.23 (from Jinja2>=2.10->flask)
  Using cached https://files.pythonhosted.org/packages/b9/2e/64db92e53b86efccfaea71321f597fa2e1b2bd3853d8ce658568f7a13094/MarkupSafe-1.1.1.tar.gz
      0 [main] python3.6 832 child_info_fork::abort: address space needed by 'libpython3.6m.dll' (0x400000) is already occupied
    ERROR: Error [Errno 11] Resource temporarily unavailable while executing command python setup.py egg_info
ERROR: Could not install packages due to an EnvironmentError: [Errno 11] Resource temporarily unavailable
0
0
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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?