Find the explicit path of %USERPROFILE% in windows 7
5,013
Solution 1
If you're not looking for a python-specific answer, you can just open a command prompt and run echo %userprofile%
.
Solution 2
Managed to do it using python:
import os
os.environ['USERPROFILE']
Related videos on Youtube
Comments
-
atomh33ls over 1 year
I am trying to find the current %USERPROFILE% path on windows 7.
What is the simplest way to do this?
I've tried hunting around with
regedit
N.b. I'm doing this as part of setting up a python virtual envionment on windows.
-
Dude named Ben over 7 yearsDoes this stackoverflow.com/questions/4906977/… help?
-
Ƭᴇcʜιᴇ007 over 7 years
echo %userprofile%
in a command prompt doesn't suffice? -
atomh33ls over 7 years@DudenamedBen Thanks yes - came to the same answer independently in the end..
-
Ƭᴇcʜιᴇ007 over 7 yearsI put it in, but you can accept it or your own answer. Whatever floats your boat. ;)
-