Time to update python to the latest version?
Python 3.6.1 2017-03-21
Python 2.7.12 2016-06-25
latest python version:
Python 2.7.15 2018-05-01
Python 3.7.1 2018-10-20
@JonB Just like the f-str in python 3.6. You could use others if we still used python 3.5. But if we had python 3.6, we can try new features and improve our code. Besides, I don't think python 3.7 is a small version. If it is, then the version should be python 3.6.x.
You would need to force quit pythonista. Also you may need to check which site packages it was installed in.
@JonB I used the latest stash and ran it on python 3. I found the new chardet in site-packages-3. But it did not work with "chardet.__version__". (Pythonista had its own chardet already.)
We wrote better code not just runnable code. Python 2 is dying in 2020. And we still use python 2 in 2020? Why don't you try python 3 now? We have a better version and we still use the outdated one. We don't run the code as a server on ipad. We don't run 10000 rows code on ipad. We can try the new features and enjoy the new version.
>>> import chardet >>> chardet.__file__ '/private/var/mobile/Containers/Shared/AppGroup/C534C622-2FDA-41F7-AE91-E3AAFE5FFC6B/Pythonista3/Documents/site-packages/chardet/__init__.py' >>> chardet.__version__ '3.0.4'
You might want to delete the chardet folder, and try install again. Be sure to force quit pythonista after.
Don't get me wrong... if there is a new version that continues to work on ios9.3.5/Ipad3, I'll use it. I just don't feel like there is no use to the app. even without any updates in the future, there is plenty to keep things interesting.
@JonB I'm using pythonista 3.2. And I can't delete the package installed in Pythonista by omz, since it looks like omz did not allow us to do it. When I reopen it, it restores the package.
You can install the new package in site-packages or site-packages-3, those take precedence over pythonista pylib folder.
Pip in stash might have a -f to force install of a pythonista pre-installed module. There are some thread around about installing chardet, idna, and a few others.
@JonB Thx. But some modules like matplotlib 3.0 which are not pure python modules. So it is still a problem. I hope omz would update these modules and python soon. By the way asyncio had some bugs when the network is unstable.
@JonB I installed chardet in site-package-3, but it seems it did not take precedence over the pre-installed version.
Did you force quit pythonista?
next, in console:
import sys, chardet del sys.modules['chardet'] import chardet print(chardet.__file__)
import sys print(sys.path)
@JonB How to set module path with code? Like
sys.modules['chardet'] = 'site-package-3/chardet'
please run the above code, and we will see if chardet was installed, and if not, we can get into why not. the sys path should already be set
@JonB I just del sys.modules[name], then I reinstall the modules using stash. Now it works.
@omz Welcome back! Any plans about updating modules or python?
Hello! Im having the same or a similar issue with requests/chardet/idna dependencies. I tried deleting chardet and restart the app, but my stash seems ”stuck” when I try to reinstall the package (or doing any other operation for that matter). All I get is ”No module named chardet”, even when I run pip install simplegist (as a simple, seemingly unrelated example?)