0

I cant' install xlrd in a virtualenv. As it seems, it fails, as it tries to install in the system python path:

But: a pip install -r requirements.txt installs some packages into the environment, before failing on this one.

(env)[steffi]$ pip install xlrd
Collecting xlrd
  Using cached xlrd-0.9.4.tar.gz
Installing collected packages: xlrd
   Running setup.py install for xlrd
   < .. lots a chat that is ok -->
running install_lib
creating /usr/lib/python2.7/site-packages/xlrd
error: could not create '/usr/lib/python2.7/site-packages/xlrd': Permission denied

Have i missed something?

M.javid
  • 6,387
  • 3
  • 41
  • 56
dev langer
  • 202
  • 1
  • 11

2 Answers2

0

It seems the installation is done with your system pip, but not the one in your virtualenv dir. Check if you setup virtualenv correctly, not using sudo at any step. By the way, a similar question is asked here: https://stackoverflow.com/a/21961024/5253807.

Community
  • 1
  • 1
chem1st
  • 1,624
  • 1
  • 16
  • 22
  • The strange thing is, that this happens (also) when using pip with -r requirements.txt .... and pip is installing some packages correctly before it fails with this one. – dev langer Aug 23 '15 at 21:56
  • 1
    Well, pip can just skip the installation of some packages with **Requirement already satisfied** output if they are already installed. Could it be the reason? I mean, are you sure the installation of those packages really proceeds? – chem1st Aug 23 '15 at 22:03
  • It compiled and installed other packages. Strange behaviour, but i think i found it ... – dev langer Aug 23 '15 at 22:15
0

Looks like the reason was some incompatibilities between different versions of virtualenv. I did not dig deeper, but removing the old environment dir, and recreating it solved the issue.

Versions involved: Creation of the env: virtualenv 13.0.3, got into trouble using it with 13.1.2

dev langer
  • 202
  • 1
  • 11