Friday 15 May 2015

python - Unable to install with pip (openSUSE) -


It can be solved, as much as I can install, but I do not know what the problem is < / Em>

Whenever I install any package with PIP, I get the permission error as follows

  sudo pip install & Lt; Packagename & gt; Download / Unpacking Request Exception: Traceback (Most Recent Call End): File "/usr/lib/python2.7/site-packages/pip/basecommand.py", Line 104, Main Status = in Self.run (Options , Args) file "/usr/lib/python2.7/site-packages/pip/commands/install.py", line 245, run requirement_set.prepare_files (finder, force_root_eg_info = self.bundle, bundle = self.bundle) File "/usr/lib/python2.7/site-packages/pip/req.py", line 971, in the prepared_files, location = req_to_install.build_location (self.build_dir, not self-download) file "/ usr / lib / python2 .7 /site-packages/pip/req.py ", line 153, build_location _make_build_dir (build_di R) "/usr/lib/python2.7/site-packages/pip/req.py" in the file, in line 1225, _make_build_dir os. Makedirs (build_dir) file "/usr/lib64/python2.7/os.py", line 157, msdir (name, mode) in makedirs OSError: [Error 13] Denied with permission: '/ home / alex / build' / Code>  

I have taken a TMP directory in my home directory, from which it is completely writeable and then setting it there

  mkdir Temp chmod 777 temp cd temp / sudo pip install packagename   

Any ideas why do I have to go through this medium?

There are only some potential problems, comments on the question).

The first one is that which has become a real problem, and possibly most likely for future explorers / readers, just focus on that. / P>

If the / home / alex / build route is also not writeable, you will get this code right from sudo pip . For example, if / home is mounted from a CD drive, then the root can also be written in a CD-ROM.

The non-root writeable home directory for network shares is, for example, if you mount an NFS share sqsh_root, then your local root is not Root to share, so it can only write world-read directories. If you mount an SMB share to use domain permissions, then the same Windows-Networking equivalent will be correct. There are several criteria for

pip , I think - build is what you want, but try pip install --help to see them all (Also, make sure you update pip devs feature / customization has been fixed while waiting for the near future of Python packaging for a short time to add and fix features.)

If bad The thing is worst, you can do - user without installation sudo Then, use sudo to move the package and your user from the site-package to the egg information files in the system.

No comments:

Post a Comment