6

I'm trying to install a Python Module by running a Windows installer (an EXE file). The Problem is that the default python folder and the defualt Installation Library are set To disc D:\ and are grayed out (meaning I can't change it). It might be fine is some places, but in my computer, D is the DVD drive, meaning that no installation is possible.

Is there any way to change this or to overcome this? The default path

Ricardo Cárdenes
  • 9,004
  • 1
  • 21
  • 34
jonatr
  • 370
  • 1
  • 7
  • 19
  • 2
    I downloaded it at http://pypi.python.org/pypi/setuptools#files . It isn't so rare (You can look around -I seen it at least ten times - problem is when it's only distributed to windows with the EXE without the sourcecode) – jonatr Jan 04 '12 at 12:30
  • @Wooble: It's a standard distutils-generated installer. – Cat Plus Plus Jan 04 '12 at 12:46

2 Answers2

7

It's not "default folder", and there's a reason there's "found in registry" next to the version. You need to re-register the Python installation if you've moved it, either by installing it again (without removing) in the same folder, or changing the directory saved in registry (HKCU\Software\Python\PythonCore\X.X\InstallPath, possibly on Wow3264Node) either manually or using registration script.

Cat Plus Plus
  • 125,936
  • 27
  • 200
  • 224
  • ,so, without being a admin (and therefore) being able to touch the registry) I can't do a thing? – jonatr Jan 04 '12 at 13:05
  • @jonatr: You can not use the installer, and install from the source. I don't remember if installer has any way to override the path. – Cat Plus Plus Jan 04 '12 at 13:14
  • OK, thanks. And If I get hold of an Admin to help me, all that is needed is to reinstall only the module, or does the whole Python program needs to be reinstalled as well? – jonatr Jan 04 '12 at 13:43
  • Oh, and another question: is there a down side in installing modules using the sourcecode (setup.py) as a non-Admin (thus not altering the Registry) as opposed to using the installer as a administrator? – jonatr Jan 04 '12 at 13:47
  • @jonatr: Package installers rarely touch registry, apart from the uninstall entry. And uninstalling packages is rather uncommon (pip can do it nowadays, I think, so no need for installer, either). So, no, same thing (unless you want to install something that requires an external compiler and you don't have it). – Cat Plus Plus Jan 04 '12 at 16:03
1

Because what you're installing (you don't say what it is) seems to be standard distutils-generated installer (as Cat Plus Plus points out in his comment) you don't have to install it by running installer. You can install it using easy_install program what allows you to choose which Python to use. See my answer to Can I install Python windows packages into virtualenvs? question.

EDIT

Now I see in your comment you're installing setuptools. This complicates things a little bit as this is the package which contains easy_install tool I mentioned above. You have chicken/egg problem here... There's solution for this, however. You can use ez_setup script to install setuptools without using exe installer.

Community
  • 1
  • 1
Piotr Dobrogost
  • 41,292
  • 40
  • 236
  • 366
  • both opening the EXE as a ZIP and ez_setup do not work ( as far as I understand, ez_setup is for post Python 2.5 (the version I have), but I tried it anyways and it did not do a thing). – jonatr Jan 11 '12 at 14:24
  • **1.** I've just downloaded [setuptools-0.6c11.win32-py2.5.exe](http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11.win32-py2.5.exe#md5=cb0cd7b844bed5106aeb0d4583848b1f) and unpacked it with 7-Zip as any other zip file. **2.** As you can see at http://packages.python.org/an_example_pypi_project/setuptools.html ez_setup.py works with Python 2.4 – Piotr Dobrogost Jan 11 '12 at 16:45
  • 1. I unzipped it fine, but the step after that (Python setup.py build\Install) did not work. – jonatr Jan 12 '12 at 13:41
  • 1. I unzipped it fine, but the step after that (Python setup.py build\Install) did not work. 2. I see it written, but running ez_setup.py returns this error message: https://www.yousendit.com/download/T2djbGtOdENZY1NFQk1UQw – jonatr Jan 12 '12 at 14:08