@shirahata (y shirahata)

Are you sure you want to delete the question?

Leaving a resolved question undeleted may help others!

Pythonで、delegator.pyのインストールでエラー

解決したいこと

python初心者です。(他言語は経験あり)
delegator.py を install したいのですが、エラーとなるためこちらで質問させていただきます。

前提

下記の「BLUE PRISM で、objectの仕様書を自動生成する」投稿を見て、pythonをインストールして動かそうとしています。
https://qiita.com/muuuuuwa/items/0804e9fdf9347463309a
Windows10 PC 上で稼働

発生している問題・エラー

pip install --no-index --find-links=pip_src delegator.py
Looking in links: pip_src
Processing c:\users*****\pip_src\delegator.py-0.1.1.tar.gz
ERROR: Could not find a version that satisfies the requirement pexpect>=4.1.0 (from delegator.py) (from versions: none)
ERROR: No matching distribution found for pexpect>=4.1.0 (from delegator.py)```

自分で試したこと

pexpectとの依存関係が原因と考え、バージョンダウンして再実行したが変わらず。
python 3.9.1 インストール ⇒ アンインストール
python 3.7.9 インストール
Anaconda3-2020.11-Windows-x86_64 インストール ⇒ アンインストール
Anaconda3-2018.12-Windows-x86_64 インストール ⇒ アンインストール
Anaconda3-5.3.1-Windows-x86_64 インストール ⇒ アンインストール
以上です。
お忙しいところ申し訳ありませんが、よろしくお願いします。

0 likes

1Answer

--no-index --find-links=pip_src だと PyPI からインデックスを取得せずに pip_src ディレクトリにあるパッケージだけをインストールしようとします。 pexpect がまだインストールされておらず、 pip_src ディレクトリにも入っていなければ、 delegator.py の依存解決に失敗すると思います。 --no-index オプションを外してみてはどうでしょうか。

0Like

Comments

  1. @shirahata

    Questioner

    回答どうもありがとうございます。
    社内のProxyの関係で、Pyplからだとエラーになってしまうので、パッケージをローカルにダウンロードしています。Pexpectがまだインストールされていない可能性については考えていませんでした。ちょっとその方向で確認してみます。
  2. @shirahata

    Questioner

    申し訳ありません。別のエラーとなってしまいます。何かわかりますでしょうか?
    pip install --no-index --find-links=pip_src delegator.py
    Looking in links: pip_src
    Processing c:\users\*****\pip_src\delegator.py-0.1.1.tar.gz
    Processing c:\users\*****\pip_src\pexpect-4.8.0.tar.gz
    Processing c:\users\*****\pip_src\ptyprocess-0.6.0.tar.gz
    Installing build dependencies ... error
    ERROR: Command errored out with exit status 1:
    command: 'c:\pg\python39\python.exe' 'c:\pg\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\*****\AppData\Local\Temp\pip-build-env-_2hyna2i\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links pip_src -- flit
    cwd: None
    Complete output (3 lines):
    Looking in links: pip_src
    ERROR: Could not find a version that satisfies the requirement flit (from versions: none)
    ERROR: No matching distribution found for flit
    ----------------------------------------
    ERROR: Command errored out with exit status 1: 'c:\pg\python39\python.exe' 'c:\pg\python39\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\*****\AppData\Local\Temp\pip-build-env-_2hyna2i\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links pip_src -- flit Check the logs for full command output.
  3. flit パッケージも必要なのでは。
  4. @shirahata

    Questioner

    回答ありがとうございます。flitも同じところに置いてありますが、うまく行かないようです。
  5. 直接 pip install --no-index --find-links=pip_src flit でインストールしてみるとどうでしょうか。
  6. @shirahata

    Questioner

    回答ありがとうございます。別案件のため、間が空いてしまい申し訳ありません。
    flit のインストールは問題無しなのですが、その後にdelegator.py のインストールでエラーとなります。
    (前の環境とは別のところで、一から入れ直しています。)
    C:\>pip install --no-index --find-links=pip_src flit
    Looking in links: pip_src
    Processing c:\pip_src\flit-3.0.0-py3-none-any.whl
    Requirement already satisfied: requests in c:\programdata\anaconda3\lib\site-packages (from flit) (2.24.0)
    Processing c:\pip_src\flit_core-3.0.0-py3-none-any.whl
    Requirement already satisfied: docutils in c:\programdata\anaconda3\lib\site-packages (from flit) (0.16)
    Processing c:\pip_src\pytoml-0.1.21.tar.gz
    Requirement already satisfied: idna<3,>=2.5 in c:\programdata\anaconda3\lib\site-packages (from requests->flit) (2.10)
    Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in c:\programdata\anaconda3\lib\site-packages (from requests->flit) (1.25.11)
    Requirement already satisfied: certifi>=2017.4.17 in c:\programdata\anaconda3\lib\site-packages (from requests->flit) (2020.6.20)
    Requirement already satisfied: chardet<4,>=3.0.2 in c:\programdata\anaconda3\lib\site-packages (from requests->flit) (3.0.4)
    Building wheels for collected packages: pytoml
    Building wheel for pytoml (setup.py) ... done
    Created wheel for pytoml: filename=pytoml-0.1.21-py2.py3-none-any.whl size=8536 sha256=a5203716138c163eeca72a5ef7a97064aa17506d22e5dfcda1c7e33162bce465
    Stored in directory: c:\users\805563\appdata\local\pip\cache\wheels\22\48\2d\04f68407cddfbcffe6a7e6ef253ca5aee4d9578a41990e2147
    Successfully built pytoml
    Installing collected packages: pytoml, flit-core, flit
    Successfully installed flit-3.0.0 flit-core-3.0.0 pytoml-0.1.21

    C:\>pip install --no-index --find-links=pip_src delegator.py
    Looking in links: pip_src
    Processing c:\pip_src\delegator.py-0.1.1.tar.gz
    Requirement already satisfied: pexpect>=4.1.0 in c:\programdata\anaconda3\lib\site-packages (from delegator.py) (4.8.0)
    Processing c:\pip_src\ptyprocess-0.6.0.tar.gz
    Installing build dependencies ... error
    ERROR: Command errored out with exit status 1:
    command: 'C:\ProgramData\Anaconda3\python.exe' 'C:\ProgramData\Anaconda3\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\805563\AppData\Local\Temp\pip-build-env-7c9h33dq\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links pip_src -- flit
    cwd: None
    Complete output (8 lines):
    Looking in links: pip_src
    Processing c:\pip_src\flit-3.0.0-py3-none-any.whl
    Processing c:\users\805563\appdata\local\pip\cache\wheels\22\48\2d\04f68407cddfbcffe6a7e6ef253ca5aee4d9578a41990e2147\pytoml-0.1.21-py2.py3-none-any.whl
    Processing c:\pip_src\requests-2.25.0-py2.py3-none-any.whl
    Processing c:\pip_src\flit_core-3.0.0-py3-none-any.whl
    Processing c:\pip_src\docutils-0.16.tar.gz
    ERROR: Could not find a version that satisfies the requirement chardet<4,>=3.0.2 (from requests->flit) (from versions: 4.0.0)
    ERROR: No matching distribution found for chardet<4,>=3.0.2 (from requests->flit)
    ----------------------------------------
    ERROR: Command errored out with exit status 1: 'C:\ProgramData\Anaconda3\python.exe' 'C:\ProgramData\Anaconda3\lib\site-packages\pip' install --ignore-installed --no-user --prefix 'C:\Users\805563\AppData\Local\Temp\pip-build-env-7c9h33dq\overlay' --no-warn-script-location --no-binary :none: --only-binary :none: --no-index --find-links pip_src -- flit Check the logs for full command output.

    chardet も置いてあります。chardetをインストールしても同様です。
    お忙しいところ恐縮ですが、アドバイスお願いできますでしょうか?
  7. > Could not find a version that satisfies the requirement chardet<4,>=3.0.2 (from requests->flit) (from versions: 4.0.0)

    flit は chardet<4,>=3.0.2 を要求していますが、 chardet 4.0.0 がインストールされているように見えます。要求を満たすバージョンをインストールしてみてはどうでしょうか。範囲内では 3.0.4 が最新です。 https://pypi.org/project/chardet/3.0.4/
  8. @shirahata

    Questioner

    @uasi様、どうもありがとうございます。
    chardet4.0.0 を外して、chardet3.0.4 を入れたら delegator.py もインストールできました。
    助かりました。これでクローズとします。

Your answer might help someone💌