Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 55

Thread: Unable to run pip/pip3 without root access

  1. #11

    Default Re: Unable to run pip/pip3 without root access

    Quote Originally Posted by malcolmlewis View Post
    Hi
    If you create a test user does it run as that user without error?
    No. I have another user and testing with it I am getting a similar error:

    Code:
    otheruser@pc:~> mpsyt
    Traceback (most recent call last):
      File "/usr/bin/mpsyt", line 7, in <module>
        from mps_youtube import main
      File "/usr/lib/python3.4/site-packages/mps_youtube/__init__.py", line 8, in <module>
        init.init()
      File "/usr/lib/python3.4/site-packages/mps_youtube/init.py", line 92, in init
        pafy.set_api_key(config.API_KEY.get)
    AttributeError: 'module' object has no attribute 'set_api_key'
    
    [~]: mpsyt
    Traceback (most recent call last):
      File "/usr/bin/mpsyt", line 7, in <module>
        from mps_youtube import main
      File "/usr/lib/python3.4/site-packages/mps_youtube/__init__.py", line 8, in <module>
        init.init()
      File "/usr/lib/python3.4/site-packages/mps_youtube/init.py", line 58, in init
        cache.load()
      File "/usr/lib/python3.4/site-packages/mps_youtube/cache.py", line 34, in load
        pafy.load_cache(cached['pafy'])
    AttributeError: 'module' object has no attribute 'load_cache'

    Else it is probably some conflict on what you may have previously installed, adjusted your user path at all?
    What do you mean?
    FWIW this system was installed as openSUSE 13.2, then upgraded each time a new release was out.

  2. #12
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,228
    Blog Entries
    15

    Default Re: Unable to run pip/pip3 without root access

    Quote Originally Posted by heyjoe View Post
    No. I have another user and testing with it I am getting a similar error:

    Code:
    otheruser@pc:~> mpsyt
    Traceback (most recent call last):
      File "/usr/bin/mpsyt", line 7, in <module>
        from mps_youtube import main
      File "/usr/lib/python3.4/site-packages/mps_youtube/__init__.py", line 8, in <module>
        init.init()
      File "/usr/lib/python3.4/site-packages/mps_youtube/init.py", line 92, in init
        pafy.set_api_key(config.API_KEY.get)
    AttributeError: 'module' object has no attribute 'set_api_key'
    
    [~]: mpsyt
    Traceback (most recent call last):
      File "/usr/bin/mpsyt", line 7, in <module>
        from mps_youtube import main
      File "/usr/lib/python3.4/site-packages/mps_youtube/__init__.py", line 8, in <module>
        init.init()
      File "/usr/lib/python3.4/site-packages/mps_youtube/init.py", line 58, in init
        cache.load()
      File "/usr/lib/python3.4/site-packages/mps_youtube/cache.py", line 34, in load
        pafy.load_cache(cached['pafy'])
    AttributeError: 'module' object has no attribute 'load_cache'


    What do you mean?
    FWIW this system was installed as openSUSE 13.2, then upgraded each time a new release was out.
    Hi
    I mean a system path tweak somewhere, change a config etc, install other items with pip3?

    If you cat /usr/bin/mpsyt is the first line (the whole shebang);
    Code:
    #!/usr/bin/python3
    
    or 
    #!/usr/bin/env python3
    If you open the python3 interpreter and run (as your user);
    Code:
     python3
    Python 3.4.6 (default, Mar 22 2017, 12:26:13) [GCC] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import re
    >>> import sys
    >>> from mps_youtube import main
    What happens?
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #13
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,228
    Blog Entries
    15

    Default Re: Unable to run pip/pip3 without root access

    Hi
    Also try a reinstall, suggest you become root user, no sudo please and it's su - not just su
    Code:
    su -
    pip3 install -I mps-youtube youtube-dl
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  4. #14

    Default Re: Unable to run pip/pip3 without root access

    Quote Originally Posted by malcolmlewis View Post
    Hi
    I mean a system path tweak somewhere, change a config etc, install other items with pip3?
    I don't know what is system path tweak. Please explain.
    Also explain what do you mean by "change a config"
    In the past I think I have ran only:

    pip install --upgrade pip
    pip install --upgrade pillow

    and I also have installed

    python-Pillow
    python3-Pillow

    I can't recall installing anything else using pip/3 but it is possible.

    Here is also the code you asked for:

    Code:
    [~]: cat /usr/bin/mpsyt
    #!/usr/bin/python3
    ...
    [~]: python3
    Python 3.4.6 (default, Mar 22 2017, 12:26:13) [GCC] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import re
    >>> import sys
    >>> from mps_youtube import main
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3.4/site-packages/mps_youtube/__init__.py", line 8, in <module>
        init.init()
      File "/usr/lib/python3.4/site-packages/mps_youtube/init.py", line 58, in init
        cache.load()
      File "/usr/lib/python3.4/site-packages/mps_youtube/cache.py", line 34, in load
        pafy.load_cache(cached['pafy'])
    AttributeError: 'module' object has no attribute 'load_cache'
    >>>

  5. #15
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,228
    Blog Entries
    15

    Default Re: Unable to run pip/pip3 without root access

    Quote Originally Posted by heyjoe View Post
    I don't know what is system path tweak. Please explain.
    Also explain what do you mean by "change a config"
    In the past I think I have ran only:

    pip install --upgrade pip
    pip install --upgrade pillow

    and I also have installed

    python-Pillow
    python3-Pillow

    I can't recall installing anything else using pip/3 but it is possible.

    Here is also the code you asked for:

    Code:
    [~]: cat /usr/bin/mpsyt
    #!/usr/bin/python3
    ...
    [~]: python3
    Python 3.4.6 (default, Mar 22 2017, 12:26:13) [GCC] on linux
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import re
    >>> import sys
    >>> from mps_youtube import main
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "/usr/lib/python3.4/site-packages/mps_youtube/__init__.py", line 8, in <module>
        init.init()
      File "/usr/lib/python3.4/site-packages/mps_youtube/init.py", line 58, in init
        cache.load()
      File "/usr/lib/python3.4/site-packages/mps_youtube/cache.py", line 34, in load
        pafy.load_cache(cached['pafy'])
    AttributeError: 'module' object has no attribute 'load_cache'
    >>>
    Hi
    OK, force the re-install of the default openSUSE versions of pip(3) and pillow(3) and see how it goes...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  6. #16

    Default Re: Unable to run pip/pip3 without root access

    Quote Originally Posted by malcolmlewis View Post
    Hi
    OK, force the re-install of the default openSUSE versions of pip(3) and pillow(3) and see how it goes...
    Done.
    What changed: now I can run pip(3) as normal user (at least I see the options of the programs, I can't 'install' as user). So trying again:

    Code:
    # pip3 uninstall mps-youtube youtube_dl
    ...
      Successfully uninstalled youtube-dl-2018.1.18
    You are using pip version 7.1.2, however version 9.0.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    #
    # pip install --upgrade pip
    Collecting pip
      Using cached pip-9.0.1-py2.py3-none-any.whl
    Installing collected packages: pip
      Found existing installation: pip 7.1.2
        Uninstalling pip-7.1.2:
          Successfully uninstalled pip-7.1.2
    Successfully installed pip-9.0.1
    # pip3 install --upgrade pip
    Requirement already up-to-date: pip in /usr/lib/python3.4/site-packages
    # pip3 install -I mps-youtube youtube-dl
    Collecting mps-youtube
      Using cached mps_youtube-0.2.7.1-py3-none-any.whl
    Collecting youtube-dl
      Using cached youtube_dl-2018.1.18-py2.py3-none-any.whl
    Collecting pafy!=0.4.0,!=0.4.1,!=0.4.2,>=0.3.82 (from mps-youtube)
      Using cached pafy-0.5.3.1.tar.gz
    Installing collected packages: pafy, mps-youtube, youtube-dl
      Running setup.py install for pafy ... done
    Successfully installed mps-youtube-0.2.7.1 pafy-0.5.3.1 youtube-dl-2018.1.18
    # logout
    [~]: mpsyt
    Traceback (most recent call last):
      File "/usr/bin/mpsyt", line 7, in <module>
        from mps_youtube import main
      File "/usr/lib/python3.4/site-packages/mps_youtube/__init__.py", line 8, in <module>
        init.init()
      File "/usr/lib/python3.4/site-packages/mps_youtube/init.py", line 58, in init
        cache.load()
      File "/usr/lib/python3.4/site-packages/mps_youtube/cache.py", line 34, in load
        pafy.load_cache(cached['pafy'])
    AttributeError: 'module' object has no attribute 'load_cache'

  7. #17
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,228
    Blog Entries
    15

    Default Re: Unable to run pip/pip3 without root access

    Quote Originally Posted by heyjoe View Post
    Done.
    What changed: now I can run pip(3) as normal user (at least I see the options of the programs, I can't 'install' as user). So trying again:

    Code:
    # pip3 uninstall mps-youtube youtube_dl
    ...
      Successfully uninstalled youtube-dl-2018.1.18
    You are using pip version 7.1.2, however version 9.0.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    #
    # pip install --upgrade pip
    Collecting pip
      Using cached pip-9.0.1-py2.py3-none-any.whl
    Installing collected packages: pip
      Found existing installation: pip 7.1.2
        Uninstalling pip-7.1.2:
          Successfully uninstalled pip-7.1.2
    Successfully installed pip-9.0.1
    # pip3 install --upgrade pip
    Requirement already up-to-date: pip in /usr/lib/python3.4/site-packages
    # pip3 install -I mps-youtube youtube-dl
    Collecting mps-youtube
      Using cached mps_youtube-0.2.7.1-py3-none-any.whl
    Collecting youtube-dl
      Using cached youtube_dl-2018.1.18-py2.py3-none-any.whl
    Collecting pafy!=0.4.0,!=0.4.1,!=0.4.2,>=0.3.82 (from mps-youtube)
      Using cached pafy-0.5.3.1.tar.gz
    Installing collected packages: pafy, mps-youtube, youtube-dl
      Running setup.py install for pafy ... done
    Successfully installed mps-youtube-0.2.7.1 pafy-0.5.3.1 youtube-dl-2018.1.18
    # logout
    [~]: mpsyt
    Traceback (most recent call last):
      File "/usr/bin/mpsyt", line 7, in <module>
        from mps_youtube import main
      File "/usr/lib/python3.4/site-packages/mps_youtube/__init__.py", line 8, in <module>
        init.init()
      File "/usr/lib/python3.4/site-packages/mps_youtube/init.py", line 58, in init
        cache.load()
      File "/usr/lib/python3.4/site-packages/mps_youtube/cache.py", line 34, in load
        pafy.load_cache(cached['pafy'])
    AttributeError: 'module' object has no attribute 'load_cache'
    Hi
    Why do you keep upgrading, consider == use the system version? Use the default openSUSE version... pip install must be run as root user, run apps as user...
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  8. #18

    Default Re: Unable to run pip/pip3 without root access

    I upgraded because pip recommends so. Tried also without upgrading - nothing changes. Still errors.
    Any other ideas?

  9. #19
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    27,228
    Blog Entries
    15

    Default Re: Unable to run pip/pip3 without root access

    Quote Originally Posted by heyjoe View Post
    I upgraded because pip recommends so. Tried also without upgrading - nothing changes. Still errors.
    Any other ideas?
    Hi
    Force the re-install of the openSUSE pip3 (it may clean something up) and another force install of the apps;
    Code:
    su -
    zypper in -f python3-pip python3-Pillow
    pip3 install -I mps-youtube youtube-dl
    exit
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  10. #20

    Default Re: Unable to run pip/pip3 without root access

    Code:
    [~]: su -
    Password:
    # zypper in -f python3-pip python3-Pillow
    Loading repository data...
    Reading installed packages...
    Forcing installation of 'python3-Pillow-2.9.0-4.1.x86_64' from repository '*Main (OSS)'.
    Forcing installation of 'python3-pip-7.1.2-7.1.noarch' from repository '*Main (OSS)'.
    Resolving package dependencies...
    
    The following 2 packages are going to be reinstalled:
      python3-Pillow python3-pip
    
    2 packages to reinstall.
    Overall download size: 1.6 MiB. Already cached: 0 B. No additional space will be used or freed after the operation.
    Continue? [y/n/...? shows all options] (y): y
    Retrieving package python3-pip-7.1.2-7.1.noarch                                                                        (1/2),   1.1 MiB (  5.2 MiB unpacked)
    Retrieving: python3-pip-7.1.2-7.1.noarch.rpm .........................................................................................................[done]
    Retrieving package python3-Pillow-2.9.0-4.1.x86_64                                                                     (2/2), 494.1 KiB (  1.8 MiB unpacked)
    Retrieving: python3-Pillow-2.9.0-4.1.x86_64.rpm ......................................................................................................[done]
    Checking for file conflicts: .........................................................................................................................[done]
    (1/2) Installing: python3-pip-7.1.2-7.1.noarch .......................................................................................................[done]
    (2/2) Installing: python3-Pillow-2.9.0-4.1.x86_64 ....................................................................................................[done]
    # pip3 install -I mps-youtube youtube-dl
    Collecting mps-youtube
      Using cached mps_youtube-0.2.7.1-py3-none-any.whl
    Collecting youtube-dl
      Using cached youtube_dl-2018.1.18-py2.py3-none-any.whl
    Collecting pafy!=0.4.0,!=0.4.1,!=0.4.2,>=0.3.82 (from mps-youtube)
      Using cached pafy-0.5.3.1.tar.gz
    Installing collected packages: pafy, mps-youtube, youtube-dl
      Running setup.py install for pafy
    Successfully installed mps-youtube-0.2.7.1 pafy-0.5.3.1 youtube-dl-2018.1.18
    You are using pip version 7.1.2, however version 9.0.1 is available.
    You should consider upgrading via the 'pip install --upgrade pip' command.
    # logout
    [~]: mpsyt
    Traceback (most recent call last):
      File "/usr/bin/mpsyt", line 7, in <module>
        from mps_youtube import main
      File "/usr/lib/python3.4/site-packages/mps_youtube/__init__.py", line 8, in <module>
        init.init()
      File "/usr/lib/python3.4/site-packages/mps_youtube/init.py", line 58, in init
        cache.load()
      File "/usr/lib/python3.4/site-packages/mps_youtube/cache.py", line 34, in load
        pafy.load_cache(cached['pafy'])
    AttributeError: 'module' object has no attribute 'load_cache'
    [~]:

Page 2 of 6 FirstFirst 1234 ... LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •