Closed alexandermorgan closed 9 years ago
You do not need sudo to install on your virtual environment since you should have access to it through your user. Using sudo actually pops you out of your virtual environment, installing it in the system Python directory.
On Aug 1, 2015, at 12:43 PM, Alexander Morgan notifications@github.com wrote:
Here's what I tried to run on the server and the message I got. Scipy was downloaded but not installed:
sudo pip install scipy The directory '/home/amor/.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.
and with the -H flag:
sudo -H pip install scipy
Command "/usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-RzKIX7/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-OioVan-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-RzKIX7/scipy
— Reply to this email directly or view it on GitHub.
I guess I forgot to mention that I tried it without sudo first and that didn't work either.
What are the permissions on '/home/amor/.cache/pip/http
? I'm guessing the permissions got screwed up there.
It's 700, (i.e. (rwx------) The file's owner may read, write, and execute the file. Nobody else has any rights.) what is it supposed to be?
Who's the file's owner? Are all the permissions in the sub-folders also assigned to the owner?
On Aug 1, 2015, at 1:23 PM, Alexander Morgan notifications@github.com wrote:
It's 700, (i.e. (rwx------) The file's owner may read, write, and execute the file. Nobody else has any rights.) what is it supposed to be?
— Reply to this email directly or view it on GitHub https://github.com/ELVIS-Project/vis-framework/issues/350#issuecomment-126938663.
I am the owner of the file and the permissions in the sub-folders also seem to be assigned to me.
Then pip install scipy
(without sudo) will work. You do not need sudo to install in your virtualenv.
Notice that it's executing with /usr/bin/python
; if it was executing with your virtualenv it would be /home/amor/path/to/virtualenv/bin/python
.
I'm not sure what Ryan did but it resolved this issue.
Here's what I tried to run on the server and the message I got. Scipy was downloaded but not installed:
sudo pip install scipy The directory '/home/amor/.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.
and with the -H flag:
sudo -H pip install scipy
Command "/usr/bin/python -c "import setuptools, tokenize;file='/tmp/pip-build-RzKIX7/scipy/setup.py';exec(compile(getattr(tokenize, 'open', open)(file).read().replace('\r\n', '\n'), file, 'exec'))" install --record /tmp/pip-OioVan-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-RzKIX7/scipy