1

Someone please tell me I'm not crazy, becuase I really feel like I am right now.

Ok so, I'm trying to setup a webapp with python and django using heroku, but I've hit quite an odd obstacle.

It wants me to setup a virtualenv using the command $ virtualenv venv --distribute, which is all well and good except:

enter image description here

yeh, so naturally I googled how to install virtualenv and I found this:

enter image description here

But, of course:

enter image description here

So I continued my search by trying to find out how to install pip and I found this:

enter image description here

Aaaaaaand that's when I completely lost my marbles because apparently you need to install pip to install virtualenv to install pip. (maybe not, but that's why I'm a noob and I need help).

But then I took another look at the vitualenv installation guide, and found that I could download it and install it manually, so I extracted all the files from the downloaded archive into my python33 folder and used setup.py install. And I got this:

enter image description here

So I changed the line in that file to except ValueError as e and I got another error from a different python file in that same folder so I reverted the change I made and decided that it probably was not a good idea to meddle with those scripts.

Please, any help at all to do with setting up a free server with python and django would be greatly appreciated. Furthermore, I am sorry if my question is stupid, or incorrectly tagged.

Moreira
  • 566
  • 2
  • 8
The-IT
  • 553
  • 8
  • 18
  • You are following install guides for linux. You should try to find an install guide for pip and virtualenv on windows. Or could also switch to a serious development machine. – Private Jul 31 '13 at 11:14
  • These are the only guides I could find. But you're right about that I should probably use linux. Unfortunately (and very much so), that is not an option for me. – The-IT Jul 31 '13 at 11:16

2 Answers2

2

You are following install guides for linux. You should try to find an install guide for pip and virtualenv on windows. First install pip systemwide and then use pip to install virtualenv systemwide. Then start using virtual environments.

Start with How to install pip on W$ and Python and virtualenv on W$. An alternative is the Hitchhiker's guide to python.

Edit

As Ron Elliott states in the comments,

you'll need to point your path to C:\Python2x\Scripts or C:\Python3x\Scripts in order to pick up easy_install and pip as well as any other script executables installing to that directory.

Community
  • 1
  • 1
Private
  • 2,232
  • 18
  • 35
  • I installed pip from the installer linked here (thanks for that btw), but I still get `"pip" is not recognized as an internal or external command, operable program or batch file` I made sure I got the right version for my python and I made sure I got the right architecture. – The-IT Jul 31 '13 at 11:36
  • That can be the topic of a new question. – Private Jul 31 '13 at 11:43
  • I just reaslised, it's because I need to edit my path environment variable, but I can't do that. Damn this. – The-IT Jul 31 '13 at 11:50
  • @The-IT that's exactly the issue, you'll need to point your path to C:\Python2x\Scripts in order to pick up easy_install and pip as well as any other script executables installing to that directory. I honestly find it easier to run an ubuntu VM in the background for my python work on windows as it makes life much more simple. – Ron E Aug 01 '13 at 00:24
  • don't you mean C:\Python3x\Scripts? Also, I'm afraid thats not an option for me. I'll have to give up this whole thing and save it for a later date. Thank you for your help though – The-IT Aug 02 '13 at 03:35
  • Why can't you add it to the path? Admin issues? If so, please ask a new q on this website along the lines of `how to install pip without admin rights`? – Private Aug 02 '13 at 05:57
  • 1
    I would actually recommend installing only virtualenv systemwide. Virtualenv will then install pip in any virtual environment you get. This gives you the last version always, and makes for less version conflicts. – Lennart Regebro Aug 02 '13 at 05:58
  • 1
    Will this also help with the OP's path issue? If so, that's a brilliant idea. – Private Aug 02 '13 at 06:00
  • @Lennart Regebro ^what he he said. @ Private I think it's an administrator issue, but it's hard to say. Allow me to explain my situation. I have one computer, and it it mine, bought and paid for. However, it belongs on my schools system, meaning that there are some restrictions. However, I have administrator rights. But there are still things I can't do, like when I try to go to my computer properties to change the environment variables, nothings happens. ( know that this is due to restrictions) – The-IT Aug 03 '13 at 08:29
  • Did you try installing virtualenv systemwide and then use pip a virtualenv? – Private Aug 03 '13 at 10:27
  • What do you mean by installing it systemwide? (You'll have to forgive my nobbieness) – The-IT Aug 04 '13 at 00:22
  • [last comment I post here, otherwise we'll have to pick it up in chat]. You can install something for the whole system or can install something in a virtual environment (venv). A venv allows is a sort of mini system that allows you to have its own packages. For instances, you can have a venv with django 1.3 (and a bunch of other packages) and a venv with django 1.6. It is a lot harder (if possible at all) to install django 1.3 and 1.6 systemwide. I work with a different venv for every project. – Private Aug 04 '13 at 06:05
1

But then I took another look at the vitualenv installation guide, and found that I could download it and install it manually, so I extracted all the files from the downloaded archive into my python33 folder and used setup.py install.

You downloaded the package and run setup.py install in wrong folder, that's why it didn't work.

You should:

  • Download the archive virtualenv-1.10.tar.gz to a Downloads folder (or where ever you want)
  • Extract it, you will have a folder name virtualenv-1.10
  • Go to (cd) the extracted folder
  • Run command: python setup.py install

Anyway I would recommend installing setuptools and pip first, then you can install virtualenv from pip: pip install virtualenv.

Hieu Nguyen
  • 8,193
  • 2
  • 29
  • 40
  • `"python33" is not recognized as an internal or external command, operable program or batch file` – The-IT Jul 31 '13 at 11:29
  • change it to: `python setup.py install` then, I thought you have several versions of python. – Hieu Nguyen Jul 31 '13 at 11:30
  • nah, just 3.3.2. and `python setup.py install` is what I did to get the error that is pictured at the end of my question. But it's ok, I'm using the installers now. I'll see how that goes – The-IT Jul 31 '13 at 11:32
  • 1
    I would actually recommend installing only virtualenv systemwide. Virtualenv will then install pip in any virtual environment you get. This gives you the last version always, and makes for less version conflicts. – Lennart Regebro Aug 02 '13 at 05:58