相关文章推荐
面冷心慈的人字拖  ·  Configure Windows ...·  1 年前    · 
霸气的骆驼  ·  Java的UUID的生成 java ...·  1 年前    · 
大力的冰棍  ·  ExoPlayer ...·  1 年前    · 
Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

I'm new to programming, this is the error ModuleNotFoundError: No module named 'pywhatkit' , I installed the module using pip, also tried pip3, the modules are installed in a env, the env is activated.

I'm using:

  • Windows 11
  • Scoop.sh
  • Python 3.10 and Pip 22.1
  • VSCode, CMD, and Powershell
  • I check that I'm using the correct interpreter path which is located at ~\scoop\apps\python\current\python.exe .

    I installed the virtual environment globally using pip install virtualenv then virtualenv wa and activated using wa\Scripts\activate .

    I ran the command python -m site , output below:

    sys.path = [
        'C:\Users\warner\programming-projects',
        'C:\Users\warner\scoop\apps\python\current\python310.zip',
        'C:\Users\warner\scoop\apps\python\current\DLLs',
        'C:\Users\warner\scoop\apps\python\current\lib',
        'C:\Users\warner\scoop\apps\python\current',
        'C:\Users\warner\scoop\apps\python\current\lib\site-packages',
    USER_BASE: 'C:\Users\warner\AppData\Roaming\Python' (doesn't exist)
    USER_SITE: 'C:\Users\warner\AppData\Roaming\Python\Python310\site-packages' (doesn't exist)
    

    When I ran this command I did it having the venv deactivated, then I run it activated and the output was the same.

    Lastly I invoked python using the where command, there was not output.

    I'm not sure if it's only a pywhatkit problem, at the moment I haven't been able to solve problem. It seems that it has something to do with the virtualenv, I'm working right now in the bot, I had to install the modules globally, for some reason looks like virtualenv is not working along with modules. – Warner May 29, 2022 at 7:23

    Thanks for contributing an answer to Stack Overflow!

    • Please be sure to answer the question. Provide details and share your research!

    But avoid

    • Asking for help, clarification, or responding to other answers.
    • Making statements based on opinion; back them up with references or personal experience.

    To learn more, see our tips on writing great answers.