C:\Users\nymhole>import sys
'import' is not recognized as an internal or external command,
operable program or batch file.
C:\Users\nymhole>
C:\Users\nymhole>for index, path in enumerate(sys.path):
index was unexpected at this time.
C:\Users\nymhole> print(f'{str(index+1) + '.':<3} {path}')
The system cannot find the file specified.
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> C:\Users\nymhole>import sys
File "<stdin>", line 1
SyntaxError: unexpected character after line continuation character
>>> 'import' is not recognized as an internal or external command,
File "<stdin>", line 1
'import' is not recognized as an internal or external command,
^
SyntaxError: invalid syntax
>>> operable program or batch file.
File "<stdin>", line 1
operable program or batch file.
^
SyntaxError: invalid syntax
>>>
>>> C:\Users\nymhole>
File "<stdin>", line 1
SyntaxError: unexpected character after line continuation character
>>> C:\Users\nymhole>for index, path in enumerate(sys.path):
File "<stdin>", line 1
SyntaxError: unexpected character after line continuation character
>>> index was unexpected at this time.
File "<stdin>", line 1
index was unexpected at this time.
^
SyntaxError: invalid syntax
>>> C:\Users\nymhole> print(f'{str(index+1) + '.':<3} {path}')
File "<stdin>", line 1
SyntaxError: unexpected character after line continuation character
>>> The system cannot find the file specified.
File "<stdin>", line 1
The system cannot find the file specified.
^
SyntaxError: invalid syntax
>>>
>>> C:\Users\nymhole>
okay! i am inexperienced and i am just trying to get pip to work again through the normal “pip” command in windows command prompt, so that it may be accessible through external programs. i am posting lots of extraneous information that may or may not be relevant to my predicament. in the post 21, i posted 2 different paths which appear to be the same but are not, one inside of the command prompt and the other inside of the environmental variables mentioned in post 16 by matther barnett. i found this out because the pip path is not present after CUDA when i use the path command or the echo %PATH% command, which give the same result. and the CUDA paths end differently. furthermore the duplicates which i removed in environmental variables are still present inside of the path command.
after opening IDLE i recieved the same thing after pasting the command.
Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.
>>> Python 3.9.0 (tags/v3.9.0:9cf6752, Oct 5 2020, 15:34:40) [MSC v.1927 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> C:\Users\nymhole>import sys
File "<stdin>", line 1
SyntaxError: unexpected character after line continuation character
>>> 'import' is not recognized as an internal or external command,
File "<stdin>", line 1
'import' is not recognized as an internal or external command,
^
SyntaxError: invalid syntax
>>> operable program or batch file.
File "<stdin>", line 1
operable program or batch file.
^
SyntaxError: invalid syntax
>>>
>>> C:\Users\nymhole>
File "<stdin>", line 1
SyntaxError: unexpected character after line continuation character
>>> C:\Users\nymhole>for index, path in enumerate(sys.path):
File "<stdin>", line 1
SyntaxError: unexpected character after line continuation character
>>> index was unexpected at this time.
File "<stdin>", line 1
index was unexpected at this time.
^
SyntaxError: invalid syntax
>>> C:\Users\nymhole> print(f'{str(index+1) + '.':<3} {path}')
File "<stdin>", line 1
SyntaxError: unexpected character after line continuation character
>>> The system cannot find the file specified.
File "<stdin>", line 1
The system cannot find the file specified.
^
SyntaxError: invalid syntax
>>>
>>> C:\Users\nymhole>
One observation is that you have Python v3.9.0. This was released back in October of 2020. Is there a particular reason why you downloaded this version as opposed to the latest and greatest? There are new features included since then. Including the match conditional statement that can be very useful among other upgrades/bug fixes.
I would recommend uninstalling ALL earlier versions and install the most recent version. Try having only one version installed. It makes it easier when installing new packages as they would all be installed to your active Python version. As you stated, you are new (i am inexperienced and i am ... - from an earlier post). This way, you start with a clean slate.
You can go here to download the latest version. Download Python | Python.org
(make sure you first uninstall ALL other versions, however)
i am not sure. it appears i already have python 3.12.5
after clicking repair i recieved this message, after some loading:
!screenshot 2Screenshot 2024-08-16 151806|648x399
and after modifying it and leaving everything as default, including “installing” pip, ive recieved a success message:
!screenshot3image_2024-08-16_152106919|651x405
… just once small point here. When you enter the script, one line should be entered one at a time and not ‘pasted’ as one unit. Enter as instructed here:
a. import sys (Enter)
b. for index, path in enumerate(sys.path): (Enter)
c. print(f'{str(index+1) + '.':<3} {path}') (Enter, Enter)
(this line should be indented relative to the previous one)
This is why the error shown in red text was generated.