ModuleNotFoundError: No module named 'requests' after pip install

后端 未结 2 1978
青春惊慌失措
青春惊慌失措 2021-01-15 05:02

I know similar questions have been asked before but I couldn\'t find the solution to my problem.

I am getting the following error message after trying to import requ

2条回答
  •  感情败类
    2021-01-15 05:44

    As @Daniel Scott mentioned before use the command mentioned above or below

    $: path-to-your-python-command -m pip install name-of-module

    If you are using linux/mac then you can find path-to-your-python command using:

    $: which python3

    /usr/bin/python3

    Lets say your python is installed here /usr/bin/python3 and the module you are installing is requests. Then you can use:

    $: /usr/bin/python3 -m pip install requests

提交回复
热议问题