0

I'm having an issue while trying to install django 2.1 on terminal in pycharm. I've tried to add it to path on advanced settings by right-clicking on computer. Not worked.

Any solutions highly appreciated.

enter image description here

Konrad Rudolph
  • 530,221
  • 131
  • 937
  • 1,214
Clausewitz
  • 13
  • 4
  • Don't put a `$` before it. – Carcigenicate Sep 28 '20 at 13:38
  • [Why not upload images of code/errors when asking a question?](https://meta.stackoverflow.com/questions/285551/why-not-upload-images-of-code-errors-when-asking-a-question) – Tibebes. M Sep 28 '20 at 13:39
  • It worked thank you. "$" requires for Linux i guess – Clausewitz Sep 28 '20 at 13:39
  • I already uploaded an image about it but idk if something wrong, its my first time using stackoverflow, hope i'll make it better next time. – Clausewitz Sep 28 '20 at 13:41
  • welcome to StackOverflow, please copy&paste code/errors instead of uploading images. Read [this for a guide](https://stackoverflow.com/help/how-to-ask) – Tibebes. M Sep 28 '20 at 13:44
  • 2
    @TalhaÇankaya No, `$` isn’t required for Linux either, and won’t work. You probably copied the command from somewhere. The `$` part wasn’t supposed to be copied, it’s part of the *prompt* (i.e. it corresponds to the `>` in your screenshot): you don’t type it, it’s printed by the console *before* you type. – Konrad Rudolph Sep 28 '20 at 13:47

1 Answers1

0

What's the output of the PATH variable when you do echo $PATH?

You can also invoke pip as a module through the python interpreter itself, which sometimes resolves path issues if things aren't linked correctly:

python -m pip install django==2.1

See the man page for more information on the m switch: https://linux.die.net/man/1/python, or this comprehensive answer.


EDIT

As carcigenicate pointed out, the issue was the manual insertion of the $ character into the prompt.

I drafted this answer shortly after it had been posted. By the time I'd finished writing it and posted the answer, the solution had been found in the comments.

Being new to answering questions on SO, I turned to the Meta site to determine what to do in this situation (should I a) delete my answer, b) edit my answer to include the solution discovered in the comments, or c) do something else?)

Based on this answer, the question should probably be voted to close, as the problem was typographical. I don't currently have enough reputation to do so, so I opted to edit my answer and leave it up, instead. :)

shinni
  • 37
  • 4
  • 1
    Read the comment section please. The issue was because of the extra "$" at the beginning - not `PATH` – Tibebes. M Sep 28 '20 at 13:46
  • Yep! I had drafted my answer before the comments came in, and only saw them after posting. Is it common courtesy to then delete the answer, or edit it? – shinni Sep 28 '20 at 16:27