Announcement

Collapse
No announcement yet.

PIP Install trouble;

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    PIP Install trouble;

    Hey everyone!

    Just got started in Kubuntu and Linux about a month ago. I'm trying to learn Python and tried to download xlrd without any luck. Below is the result of a couple of things I've tried. Act like I know little to nothing please, seeing as I do!

    frostyflamez@frostyflamez-Latitude-E6420:~$ tar xzf xlrd.tgz
    tar (child): xlrd.tgz: Cannot open: No such file or directory
    tar (child): Error is not recoverable: exiting now
    tar: Child returned status 2
    tar: Error is not recoverable: exiting now
    frostyflamez@frostyflamez-Latitude-E6420:~$ pip install xlrd
    The directory '/home/frostyflamez/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    The directory '/home/frostyflamez/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    Collecting xlrd
    /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/l...latformwarning.
    InsecurePlatformWarning
    Downloading xlrd-0.9.3.tar.gz (178kB)
    100% |████████████████████████████████| 180kB 443kB/s
    Building wheels for collected packages: xlrd
    Exception:
    Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
    File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 293, in run
    wb.build(autobuilding=True)
    File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 756, in build
    ensure_dir(output_dir)
    File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 70, in ensure_dir
    os.makedirs(path)
    File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
    File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
    File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
    File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
    OSError: [Errno 13] Permission denied: '/home/frostyflamez/.cache/pip/wheels/5b'


    frostyflamez@frostyflamez-Latitude-E6420:~$ pip install xlrd
    The directory '/home/frostyflamez/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    The directory '/home/frostyflamez/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
    Collecting xlrd
    /usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/l...latformwarning.
    InsecurePlatformWarning
    Downloading xlrd-0.9.3.tar.gz (178kB)
    100% |████████████████████████████████| 180kB 811kB/s
    Building wheels for collected packages: xlrd
    Exception:
    Traceback (most recent call last):
    File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 223, in main
    status = self.run(options, args)
    File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 293, in run
    wb.build(autobuilding=True)
    File "/usr/local/lib/python2.7/dist-packages/pip/wheel.py", line 756, in build
    ensure_dir(output_dir)
    File "/usr/local/lib/python2.7/dist-packages/pip/utils/__init__.py", line 70, in ensure_dir
    os.makedirs(path)
    File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
    File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
    File "/usr/lib/python2.7/os.py", line 150, in makedirs
    makedirs(head, mode)
    File "/usr/lib/python2.7/os.py", line 157, in makedirs
    mkdir(name, mode)
    OSError: [Errno 13] Permission denied: '/home/frostyflamez/.cache/pip/wheels/5b'

    #2
    The first error clearly relates to you feeding "tar" a filename that doesn't exist in the location you are referencing it. The other errors all come down to a directory in your home cache probably being owned by root. Chdir into your ~/.cache and execute "chown -R 1000.1000 *" or change the '1000' to your username. Alternatively you can directly execute "chown -R user.user ~/.cache" which will also reset all files in that directory tree to be owned by your real user. Replace user with your username.

    (oh, and if it doesn't work, prepend "sudo". Then it will execute as root but still make all files owned by your real user. Also, the ~ will still expand to your home directory (the same as $HOME)).
    Last edited by xennex81; Jul 10, 2015, 10:50 PM.

    Comment


      #3
      Originally posted by jonathancalebambriz View Post
      Just got started in Kubuntu and Linux about a month ago... tried to download xlrd ...
      (I know not much about xlrd, or Python, and please excuse me if you know this already.)
      With any well-supported distro like Kubuntu, you don't manually download and install stuff unless you really have to. First, you fire up your package manager, and see what's available. Dependency management, updates, and security are all taken care of for you, for very little effort.

      Someone told me that Kubuntu's proper package manager, muon, is not installed by default, just the (IMO) dumbed-down "Muon Discover"; if so, I recommend starting muon discover, click in the search box, and type muon, click install. Then start "Muon Package Manager" on the system menu and type xlrd. You get a choice of Python 2 or 3 versions.

      Even if you are, say, a Python expert, and the version you get from the repositories (using muon or another package manager) is not up to what you need, starting with the packaged version can avoid lots of problems. I've often given the advice to run
      Code:
      sudo apt-get build-dep [i]whatever[/i]
      to solve build problems.
      Regards, John Little

      Comment

      Working...
      X