Forums

pip install --user permission issue

Hi there, first post so apologies if this is obvious! Entering

pip install --user ka-lite

results in the package being fetched but the installation process failing on:

    creating /usr/share/kalite
error: could not create '/usr/share/kalite': Permission denied

----------------------------------------
Command "/usr/local/bin/python2.7 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-22JS_d/ka-    lite/setup.py';exec(compile(getattr(tokenize, 'open', 
open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-3LoTRZ-record/install-record.txt --single-version-externally-manag
ed --compile --user --prefix=" failed with error code 1 in /tmp/pip-build-22JS_d/ka-lite/

Any advice welcome, thanks for looking :)

That looks like a bug in the package that doesn't acknowledge the "--user" argument for the install. You could try installing into a virtualenv and see if that works better.

Thanks fo looking glenn - no luck in virtualenv which gives:

(kalite) 08:59 ~ $ pip install kalite
Collecting kalite/home/instantschools/.virtualenvs/kalite/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can  upgrade to a newer version of Python to solve this. For more information, see  ttps://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.
SNIMissingWarning/home/instantschools/.virtualenvs/kalite/local/lib/python2.7/site-    packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext     object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.  InsecurePlatformWarning  Could not find a version that satisfies the requirement kalite (from versions: )No matching distribution found for kalite
(kalite) 08:59 ~ $ pip install kalite-static
Collecting kalite-static/home/instantschools/.virtualenvs/kalite/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#snimissingwarning.  SNIMissingWarning/home/instantschools/.virtualenvs/kalite/local/lib/python2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning.  InsecurePlatformWarning  Could not find a version that satisfies the requirement kalite-static (from versions: )No matching distribution found for kalite-static

I'll try cloning the git repo and see if that works.

That's because you typed kalite instead of ka-lite

Ha! well spotted. It flits a lot between the two spellings depending on what your're doing :)

But meanwhile I've cloned the gitrepo and have it ready to run...I'm getting a port conflict issue, but that's distinct from this which is reolved now. Thanks for the help!