omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular

    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

    Pythonista
    5
    10
    4253
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ihf
      ihf last edited by

      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?

      mikael 1 Reply Last reply Reply Quote 0
      • ccc
        ccc last edited by ccc

        selfupdate -f # https://github.com/ywangd/stash

        Is your default Python 2 or 3?

        1 Reply Last reply Reply Quote 0
        • ihf
          ihf last edited by

          Ran selfupdate -f. Using Python3. Error persists.

          1 Reply Last reply Reply Quote 0
          • ccc
            ccc last edited by

            Please provide the command that was typed to generate the InportError and the full log of that error.

            1 Reply Last reply Reply Quote 0
            • mikael
              mikael @ihf last edited by

              @ihf, set this to get a full traceback:

              stashconf py_traceback 1
              
              1 Reply Last reply Reply Quote 0
              • ihf
                ihf last edited by ccc

                [~/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]$
                
                JonB 1 Reply Last reply Reply Quote 0
                • ccc
                  ccc last edited by

                  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.

                  1 Reply Last reply Reply Quote 0
                  • ihf
                    ihf last edited by

                    @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).

                    1 Reply Last reply Reply Quote 0
                    • JonB
                      JonB @ihf last edited by JonB

                      @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...

                      bennr01 1 Reply Last reply Reply Quote 1
                      • bennr01
                        bennr01 @JonB last edited by

                        /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 in site-package-3 or site-packages-2 depending on the python version, but it seems like xmlrpc is installed in site-packages...

                        @JonB said:

                        @bennr01 -- probably need to add xmlrpc to the blacklist...

                        It seems like in this case xmlrpc is provided by the future package.

                        1 Reply Last reply Reply Quote 0
                        • First post
                          Last post
                        Powered by NodeBB Forums | Contributors