Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.
Pip error in Stash with Python3
-
When I try to use pip under stash 0.7.4, I get:
stash: <class 'ImportError'>: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted.
How to fix? -
selfupdate -f
# https://github.com/ywangd/stashIs your default Python 2 or 3?
-
Ran selfupdate -f. Using Python3. Error persists.
-
Please provide the command that was typed to generate the InportError and the full log of that error.
-
@ihf, set this to get a full traceback:
stashconf py_traceback 1
-
[~/Documents]$ pip install bleep stash: <class 'ImportError'>: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted. Traceback (most recent call last): File "site-packages/stash/bin/pip.py", line 976, in __init__ import xmlrpclib ModuleNotFoundError: No module named 'xmlrpclib' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages/stash/system/shruntime.py", line 546, in exec_py_file exec (code, namespace, namespace) File "site-packages/stash/bin/pip.py", line 1572, in <module> repository = get_repository(requirement, site_packages=site_packages, verbose=ns.verbose) File "site-packages/stash/bin/pip.py", line 1433, in get_repository return PyPIRepository(site_packages=site_packages, verbose=verbose) File "site-packages/stash/bin/pip.py", line 979, in __init__ import xmlrpc.client as xmlrpclib File "/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages/xmlrpc/__init__.py", line 7, in <module> raise ImportError('This package should not be accessible on Python 3. ' ImportError: This package should not be accessible on Python 3. Either you are trying to run from the python-future src folder or your installation of python-future is corrupted. [~/Documents]$
-
https://github.com/matthewelse/bleep looks like it has not been improved since 2015. At that point it had experimental support for macOS and I see no mention of support for iOS. On the Mac, it talks about
brew install boost
which is not going to happen on iOS. If you really want to use this module please open an issue on the bleep repo asking for iOS support. -
@ccc Were you making a joke? The use of "bleep" was just a placeholder for ANY module that I attempt to install. It is not a function of what I am installing. It's a problem with pip and stash under Python3 (at least with my environment).
-
@ihf delete the site-packages/xmlrpc folder, or move it to site-packages-2.
File "/private/.../site-packages/xmlrpc/init.py", line 7, in <module>
raise ImportError('This package should not be accessible on Python 3. 'Thats how you can tell. That should not have been installed in site-packages, since xmlrpc comes with python3.
@bennr01 -- probably need to add xmlrpc to the blacklist...
-
/private/var/mobile/Containers/Shared/AppGroup/05D14C00-CCAC-4E98-A3CC-96C6944B8534/Pythonista3/Documents/site-packages/xmlrpc/__init__.py
Did you install this package using the
-6
parameter or did you use an outdated StaSh version for this installation? Normally, packages should now be installed only insite-package-3
orsite-packages-2
depending on the python version, but it seems likexmlrpc
is installed insite-packages
...@JonB said:
@bennr01 -- probably need to add xmlrpc to the blacklist...
It seems like in this case
xmlrpc
is provided by thefuture
package.