ywangd / stash

StaSh - Shell for Pythonista
MIT License
1.92k stars 227 forks source link

staSH isn't getting module dependancies #511

Open jeffhaskin opened 1 week ago

jeffhaskin commented 1 week ago

Hardware

Device: iPad Pro 12.9" 3rd Gen (2018) OS: iPadOS 17.5.1 (21F90)

Description

It appears pip install isn't getting dependancies when installing modules.

I attempted pip install openai and it installed fine, but when I tried to see openai's --help menu, it showed it didn't have a dependancy and couldn't run. Upon further investigation, it didn't have any dependancies.

I attempted to manually get the first dependancy that failed (typing_extensions), and it fails to download. It doesn't say why it failed to download the package. I went to the given url for the attempted download and it downloads from the browser fine.

Console

Here's the output from staSH:

Making sure it's updated

[~/Documents]$ selfupdate
site-packages/stash/bin/selfupdate.py:56: DeprecationWarning: The distutils package is deprecated and slated for removal in Python 3.12. Use setuptools or check PEP 632 for potential alternatives
  from distutils.version import StrictVersion
Running selfupdate ...
Target: ywangd:master
Checking for new version ...
Already at latest version

Installing openai

[~/Documents]$ pip install openai
Querying PyPI ... 
Downloading package ...
Opening: https://files.pythonhosted.org/packages/57/47/60f994a805d39642b56cafa31407a7a1cd26483cc21b082184e82e974599/openai-1.35.7-py3-none-any.whl

Save as: /private/var/mobile/Containers/Data/Application/CA3BE29E-CE62-4B6D-89AB-88B9E2851A01/tmp//openai-1.35.7-py3-none-any.whl (327468 bytes)
[====================] 100.00% | 319.8KiB          
stash: ^C
KeyboardInterrupt: Exit: 0

Installing wheel: openai-1.35.7-py3-none-any.whl...
No top_level.txt, try to fix this. ['openai']
Package installed: openai
Installing dependency: anyio[('<', '5'), ('>=', '3.5.0')] (required by: openai)
Querying PyPI ... 
Downloading package ...
Opening: https://files.pythonhosted.org/packages/7b/a2/10639a79341f6c019dedc95bd48a4928eed9f1d1197f4c04f546fc7ae0ff/anyio-4.4.0-py3-none-any.whl

Save as: /private/var/mobile/Containers/Data/Application/CA3BE29E-CE62-4B6D-89AB-88B9E2851A01/tmp//anyio-4.4.0-py3-none-any.whl (86780 bytes)
[====================] 100.00% | 84.7KiB          
stash: ^C
KeyboardInterrupt: Exit: 0

Installing wheel: anyio-4.4.0-py3-none-any.whl...
Package installed: anyio
Installing dependency: idna[('>=', '2.8')] (required by: anyio)
Querying PyPI ... 
Downloading package ...
Opening: https://files.pythonhosted.org/packages/e5/3e/741d8c82801c347547f8a2a06aa57dbb1992be9e948df2ea0eda2c8b79e8/idna-3.7-py3-none-any.whl

Save as: /private/var/mobile/Containers/Data/Application/CA3BE29E-CE62-4B6D-89AB-88B9E2851A01/tmp//idna-3.7-py3-none-any.whl (66836 bytes)
[====================] 100.00% | 65.3KiB          
stash: ^C
KeyboardInterrupt: Exit: 0

Installing wheel: idna-3.7-py3-none-any.whl...
No top_level.txt, try to fix this. ['idna']
Package installed: idna
Installing dependency: sniffio[('>=', '1.1')] (required by: anyio)
Querying PyPI ... 
Downloading package ...
Opening: https://files.pythonhosted.org/packages/e9/44/75a9c9421471a6c4805dbf2356f7c181a29c1879239abab1ea2cc8f38b40/sniffio-1.3.1-py3-none-any.whl

Save as: /private/var/mobile/Containers/Data/Application/CA3BE29E-CE62-4B6D-89AB-88B9E2851A01/tmp//sniffio-1.3.1-py3-none-any.whl (10235 bytes)
[====================] 100.00% | 10.0KiB          
stash: ^C
KeyboardInterrupt: Exit: 0

Installing wheel: sniffio-1.3.1-py3-none-any.whl...
Package installed: sniffio

Attempting to see the openai --help menu

[~/Documents]$ openai --help
stash: <class 'ModuleNotFoundError'>: No module named 'typing_extensions'

Installing the missing module typing_extensions

[~/Documents]$ pip install typing_extensions
Querying PyPI ... 
Downloading package ...
Opening: https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl

Save as: /private/var/mobile/Containers/Data/Application/CA3BE29E-CE62-4B6D-89AB-88B9E2851A01/tmp//typing_extensions-4.12.2-py3-none-any.whl (37438 bytes)
[====================] 100.00% | 36.6KiB          
stash: ^C
KeyboardInterrupt: Exit: 0

Error: failed to download package from https://files.pythonhosted.org/packages/26/9f/ad63fc0248c5379346306f8668cda6e2e2e9c95e01216d2b8ffd9ff037d0/typing_extensions-4.12.2-py3-none-any.whl
stash: ^C
KeyboardInterrupt: Exit: 1