1

I'm installing Theano on a server where I'm not the root.

I ran

pip install Theano --user

which returns the following error

Installing collected packages: scipy
  Found existing installation: scipy 0.9.0
    Uninstalling scipy:
Exception:
Traceback (most recent call last):
  File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
    self.run(options, args)
  File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 228, in run
    requirement_set.install(install_options, global_options)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1089, in install
    requirement.uninstall(auto_confirm=True)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 476, in uninstall
paths_to_remove.remove(auto_confirm)
  File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1391, in remove
renames(path, new_path)
  File "/usr/lib/python2.7/dist-packages/pip/util.py", line 248, in renames
shutil.move(old, new)
  File "/usr/lib/python2.7/shutil.py", line 300, in move
os.unlink(src)
OSError: [Errno 13] Permission denied: '/usr/share/pyshared/scipy-0.9.0.egg-info'

so apparently, Theano wants to install scipy, but it's already installed, so it attempts to uninstall it first, which brings the permission issue.

How can I go around it so as to not uninstall scipy, but use the existing one?

Kenster
  • 23,465
  • 21
  • 80
  • 106
ytrewq
  • 3,670
  • 9
  • 42
  • 71
  • the cleanest way is probably to install everything into a virtualenv. – cel Sep 10 '15 at 10:25
  • @cel could you elaborate please? I know zero about virtualenv... – ytrewq Sep 10 '15 at 10:30
  • It's hard to explain that thoroughly in comments. The basic idea is to cleanly separate packages that are installed by your OS from the packages installed by your user. You may want to get a quick overview here: http://docs.python-guide.org/en/latest/dev/virtualenvs/ – cel Sep 10 '15 at 10:56

1 Answers1

2

The problem is that the scipy-version you have installed is not recommended. Theano usually needs at least version 0.11 to work. It seems that your version is also working but has some known bugs. (Installation Instructions) If you wish to use your old version and risk the bugs, you should be able to use:

pip install Theano --user --no-dependencies

Note that the other two requirements numpy and six will also not be checked and updated

Dencrash
  • 133
  • 1
  • 7