Python Forum
Python path not detected even it run in cmd.
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Python path not detected even it run in cmd.
#1
Hello everyone,

I would like to ask about Python's Windows environment variables.

I have added python directory to "PYTHON" in user and system variable as follow.
Quote:C:\Users\Rocky\AppData\Local\Programs\Python\Python36\

Also in "Path" of user and system variable.
Quote:%PYTHON%
Quote:C:\Users\Rocky\AppData\Local\Programs\Python\Python36\Scripts\

This is it.
[Image: 2lcprnl.jpg]

And I had rebooted a computer then test to run python command with some script in cmd and
work fine.
[Image: 34ss7id.jpg]
But when I try to install "electron" which is npm package in Node.js programming by command "npm install electron",it required python and it is not detect a python.
Am I miss something?

I find answer for myself and it might be helpful for someone in the future.
There is nothing wrong with path but some Python dependencies may required
Python 2 or 3 so you can install both of them on the same computer as It will not overwrite on each other.
In this case I installed Python 3 first but the electron package which required
node-gyp package which required Python 2 so it is not detected.
Reply
#2
Add also python folder.
C:\Users\Rocky\AppData\Local\Programs\Python\Python36\
C:\Users\Rocky\AppData\Local\Programs\Python\Python36\Scripts\
I do not at like the long default path Python 36 use on Windows,so have more about that here.
[Image: lwkZgx.jpg]
Reply
#3
Thank you snippsat !
Reply
#4
I don't use Windows much. If I do, only in a VM.
But I like the feature, that you can install applications locally without administrator rights.
Windows is getting closer and closer to Linux.

The good thing is, that the user can make the decision.
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  No Python 3.10 installation was detected RussellZoloft 1 5,533 Oct-13-2021, 12:08 PM
Last Post: snippsat
  path-issues in installing a wordpress - wrong pipe-path - like a testscript says apollo 1 1,899 Jun-12-2019, 12:24 AM
Last Post: anne12

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020