Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript npm Basics (retiring) Installing Packages with npm Installing Local Packages

Gabriel Ward
Gabriel Ward
20,222 Points

Installing bcrypt and python on Windows

I'm trying to follow along locally on my computer, not in Workspaces. I tried installing Python, restarting my computer, and then in the Command Prompt I typed 'python' to check if it's installed and in the Command prompt it says ''python' is not recognized as an internal or external command, operable program or batch file." Does anyone have any advice on what to do? I went to the python site and it said to type in 'python' to test if it's installed. I'd be grateful for any help/advice.

3 Answers

Sounds like you need to add Python to your $PATH

Here is a step-by-step on Super User. Replace C:\Python27 with the path to Python on your machine.

Gabriel Ward
Gabriel Ward
20,222 Points

Hi Shawn,

Thanks for your reply. I'm relatively new to this command line business. What do you mean by 'Replace C:\Python27 with the path to Python on your machine.'? I'm pretty sure I installed it on my C drive.

If you look at the link I posted the last step shows you where to add the path to your Python install. In the example they use c:\Python27. The path to Python on your machine will be different.

Gabriel Ward
Gabriel Ward
20,222 Points

ok I will have to investigate further. I am completely bamboozled at this point.

  1. Open System Properties (type it in the start menu, or use the keyboard shortcut Win+Pause)
  2. Switch to the Advanced tab
  3. Click Environment Variables
  4. Select PATH in the System variables section
  5. Click Edit
  6. Add python's path to the end of the list (the paths are separated by semicolons). For example:

C:\Windows;C:\Windows\System32;C:\ path to your Python install

Gabriel Ward
Gabriel Ward
20,222 Points

Ok I'm in the system variables and I'm in edit, do I add a new path? I'm not seeing anything about python in any of the existing paths. Thank you Shawn, I'm grateful for your help.

No you won't see anything, that's the problem :) you need to add it.

At the very end of your PATH statement add a semicolon then add the full path to your Python install.

Gabriel Ward
Gabriel Ward
20,222 Points

Ok and am I making the path up? Or, because I'm pretty sure it is installed on my computer, am I using a particular path? If I am using a particular path, how do I find it?

Hard to explain that one. When you installed Python it got installed somewhere...for example c:\Python

Gabriel Ward
Gabriel Ward
20,222 Points

Great, I got it to work!!! Thanks so much.

If I may ask, I went to this video https://teamtreehouse.com/library/express-basics/getting-started-with-express/install-expressjs

I tried doing the cloning

git clone https://github.com/hdngr/treehouse-express-basics.git express-basics

in my command line, as per the video. And got the same error "'git' is not recognized as an internal or external command, operable program or batch file."

Is this a similar problem to what I had with Python just now?

Thanks, for any help you may have on this one!

have you installed git yet? If not here a decent little video on how to install it on Windows

https://www.youtube.com/watch?v=Jq7aZWACRKc

Gabriel Ward
Gabriel Ward
20,222 Points

I figured out that I would have to do that. I'm now having a challenge intsalling bcrypt into a folder on my desktop haha. I tried npm install bcrypt, and I got a massive big long error!

The easiest why to have npm is to install node.js. Node JS is super easy to install and it will give you npm so you can run the npm commands :)

p.s. If I get this working for you yo owe me lunch ;)

Gabriel Ward
Gabriel Ward
20,222 Points

I have npm working. But I'm not having any luck installing bcrypt into a folder on my desktop. Though I'm pretty sure I managed to install it into my C: drive.

I would gladly buy you lunch, but I don't live in the USA!