Pathlib and pipenv issues

im trying to from pathlib import Path but i get this error i use windows

pathlib : The term ‘pathlib’ is not recognized as the name of
a cmdlet, function, script file, or operable program. Check
the spelling of the name, or if a path was included, verify
that the path is correct and try again.
At line:1 char:1

  • pathlib import Path
  •   + CategoryInfo          : ObjectNotFound: (pathlib:String)  
      [], CommandNotFoundException
      + FullyQualifiedErrorId : CommandNotFoundException
    
    

can someone tell me what i did wrong? its got me stuck in the course also same thing happens for pipenv so whatever im doing wrong i need to do for both of these

tysm

What version of python do you have? (Python --version). Pathlib was added from vers 3.4. When python was installed was it included in path? What editor/environment are you using? Are you in terminal or shell window? Try ```
Python -c "import sys; print(’\n’.join(sys.path))

To find the Path.
1 Like

Python 3.9.7 on VSCode

im writing in terminal but i think its a powershell i do not really understand powershell yet sorry im very new

PS C:\Users\Dusti\OneDrive\Desktop\Hello World> Python -c "import sys; print(‘\n’.join(sys.path))

Python -c "import sys; print(‘\n’.join(sys.path))
At line:2 char:40

  • Python -c "import sys; print(’\n’.join(sys.path))
  •                                    ~
    

Missing ‘)’ in method call.
At line:2 char:40

  • Python -c "import sys; print(’\n’.join(sys.path))
  •                                    ~~~~~~~~
    

Unexpected token ‘sys.path’ in expression or statement.
At line:2 char:40

  • Python -c "import sys; print(’\n’.join(sys.path))
  •                                    ~
    

Missing closing ‘)’ in expression.
At line:2 char:48

  • Python -c "import sys; print(’\n’.join(sys.path))
  •                                            ~
    

Unexpected token ‘)’ in expression or statement.
At line:2 char:49

  • Python -c "import sys; print(’\n’.join(sys.path))
  •                                             ~
    

Unexpected token ‘)’ in expression or statement.
+ CategoryInfo : ParserError: (:slight_smile: , ParentConta
insErrorRecordException
+ FullyQualifiedErrorId : MissingEndParenthesisInMethodCal
l

PS C:\Users\Dusti\OneDrive\Desktop\Hello World>