ywangd / stash

StaSh - Shell for Pythonista
MIT License
1.93k stars 226 forks source link

boto3 pip package issue #405

Open mcmans opened 4 years ago

mcmans commented 4 years ago

I’m having issues trying to pip install boto3. Attached a screenshot of the install and trying to import, also it’s not present in site-packages.

Screenshot 2020-03-14 at 11 04 21 Screenshot 2020-03-14 at 11 05 17
bennr01 commented 4 years ago

Interesting bug. It seems like it is a py3-exclusive bug with our wheel installer. As a workaround, you can use pip --verbose install python-dateutil; pip --verbose install --no-binary :all: boto3 for now. You may need to run pip uninstall boto3first.

ongyx commented 4 years ago

Upon installing boto3, the contents of the site-packages-3 was deleted, with only these files remaining:

[~/Documents]$ ls ~/Documents/site-packages-3

/private/var/mobile/Containers/Shared/AppGroup/6C2ECC4F-72E4-4527-BBDF-918E842C781D/Pythonista3/Documents/site-packages-3/:
futures-3.1.1.dist-info Readme.md

Apparently, when installing futures as a dependency, for some reason only its dist-info folder remains, with all other files deleted. This is a big problem because it will lead to loss of user data in site-packages-3, and must be fixed ASAP. The futures package must be blacklisted as soon as possible.

ongyx commented 4 years ago

The problem would be installing futures when running StaSh on Python 3. Because futures is a Python 2 backport of the Python 3 concurrent.futures, it will appear to successfully install on StaSh in Python 3 (when in fact the whole site-packages-3 folder is erased).

bennr01 commented 4 years ago

Interestingly, concurent.futures is actually installed, but in the parent directory of site-packages-3.

ongyx commented 4 years ago

For now, it would be a good idea to blacklist futures on pip first.

bennr01 commented 4 years ago

@onyxware OK, I have blacklisted it for now.

EDIT: Seems like we both did the same...

ongyx commented 4 years ago

Thank you, I guess I will replace my blacklist copy with yours.

ongyx commented 4 years ago

By the way, you should notify StaSh users to update their copy using selfupdate -f so that site-packages-3 won’t be erased if somebody tries to install futures accidentally...

EDIT: If they are on the dev release, use selfupdate -f ywangd/dev instead.