Import could not be resolve after installing the dependency

171
March 27, 2022, at 11:10 AM

I'm trying to install de messagebird dependency into my python project.

I write into requirements.txt and after I run pip install -r requirements.txt as you can see below:

But the pylance was still showing me the error:

Then I try to install using pip install messagebird but still with no success.

I also try to reopen the window but no success too.

I'm using pyenv, and using the right env on the vscode and terminal as you can see on the next images:

And in the terminal:

Answer 1

You may be installing to the wrong Python distro? (could be installing to Python 2.7)

To target python3 you can use the following commands

python3 -m pip install -r requirements.txt

Or

pip3 install -r requirements.txt

To check that you've installed messagebird correctly you could also use the following command:

pip3 freeze | grep 'messagebird'
Rent Charter Buses Company
READ ALSO
With cartopy, can a local map be rotated so that north points in an arbitrary direction?

With cartopy, can a local map be rotated so that north points in an arbitrary direction?

I have this block of python code to plot a city-scale satellite map

144
python - convert curl command

python - convert curl command

I have this curl command

147
AssertionError inside of ensure_local_distutils when building a PyInstaller exe using setuptools/distutils

AssertionError inside of ensure_local_distutils when building a PyInstaller exe using setuptools/distutils

I am trying to convert some Python code into anexe with PyInstaller

226
Function to return current half quarter and previous two quarters based on current date

Function to return current half quarter and previous two quarters based on current date

I would like to create a variable (suffix) that prints current year and quarter in this format: '_21_q2' and (previous_suffix) which is simply suffix - 2 quarters in this case: '_21_q2'

141