I'm trying to run a script in python 3.9.1, on mac os, and several modules show a message of unresolved import 'aioboto3'Python(unresolved-import)
I ran pip3 in order to install them, it seems to have installed them but the messages still appear.
vscode does display correct version on the lower left bar.
Please advise on how can I resolve this? or even if this is an issue?
Based on the information you provided, I reproduced the problem:
Please check whether the module "aioboto3" has been installed in the python environment you are using: (pip show aioboto3)
(If it does not display the module installation information, it means that the module is not available in this environment. Please open a new VS Code terminal and make sure that the terminal is using the expected python environment (python --version).)
Please reload VS Code to let it recognize that the module has been installed.
Run:
Reference: Python Environments in VS Code.
Related
there is some modules that when im trying to install from pypI, like pyfiglet or Django framework, i'll saw some errors. how can i fix it? my python versio is 3.9.4
For installing and checking the python module "pyfiglet" in VS Code, please refer to the following:
Please make sure that python is available, and select the required python environment in the lower left corner of VS Code.
Please use the shortcut key Ctrl+Shift+` to open a new VS Code terminal, and check whether the python used by the terminal is the same as the lower left corner of VS Code: ( python --version )
Then install the module "pyfiglet": (pip install pyfiglet)
Check the installation of this module: (pip show pyfiglet)
Run:
Reference: Getting Started with Python in VS Code and Python environments in VS Code.
from pytube import Youtube
enter image description here
Based on the information you provided, I reproduced this problem:
Please refer to the following to check the installation process of the module:
If you have multiple python environments, please check whether the VS Code terminal is using the selected python environment (shown in the lower left corner of VS Code), if they are not the same, please open a new VS Code terminal. (python --version)
Install the module "pytube". (pip install pytube)
Check the location of the module: (pip show pytube)
Then, please reload VS Code to make it recognize this moduleļ¼(F1, Developer: Reload Window)
Reference: Python environment in VS Code.
Your Python interpreter may also be found on the bottom right corner of VS Code
I have downloaded Pandas library with pip install pandas through the command prompt, when I try to import pandas as pd PyCharm returns an error : ModuleNotFoundError: No module named 'pandas'
I have tried to uninstall and install again many times but nothing seems to work. Does anybody know a solution to this?
You can try downloading the library from PyCharm settings:
File -> Settings
then, Project: -> Python Interpreter
Click a + sign to the right,
Search for the pandas library,
and finally, press 'Install Package'
I think you have to choose the right python interpreter. Check my screenshot
You likely have multiple copies of Python installed on your system. PyCharm can be configured to use any version of Python on your system, including any virtual environments you've defined. The solution is to match up the version of Python you've installed Pandas into with the version of Python that PyCharm is using to run your code.
There are two places where you specify a Python version. First of all, your Project has a version associated with it. Check the "Python Interpreter" section of the "Project" section of your Preferences for that. That version is used for syntax highlighting, code completion, etc.
By default, the abovementioned Python version will also be used to run your code. But you can change the version of Python that your code is run with by creating or modifying a Run Configuration. To do this, check the menu next to the Run and Debug toolbar buttons near the top-left of your PyCharm window.
When you do get into the Python Interpreter section of the Preferences, you'll find that you can see all of the modules installed for each Python version that PyCharm knows about. You can use this to check to see if Pandas is installed for a particular Python version.
I would suggest you get comfortable with all that I've said above. It will save you many headaches in the future.
Image of code and pytorch and my error
I have no idea why this perfect baseline code is not running on my pc.
I fail to install "processes" package.
I fail to use modules of "tools".
Please help me...
The Perfect baseline is below.
https://github.com/audio-captioning/dcase-2020-baseline
Pls. make sure that you are using the same virtual environment in Pycharm(or the IDE) in which you have installed this.
You can run which python to check the python interpreter. Ensure that it is same in where you have installed. Also, check with pip list if proper installation is there and then go for the same import statement in a python terminal.
I am trying to install the huobi_python lib to my pycharm however i'm unable to do so. I have tried multiple times to add it and google it but did not succseed. Does anyone know how to fix this?
Github link:https://github.com/huobiapi/huobi_Python
Running windows 10, no i cannot find it in Project interpeter and with the + sign. Those are mostly REST api's
You wouldn't add it as an interpreter.
Since the project isn't available as pip install, you'd have to build it from source. Meaning clone the repo, and run the command listed in the installation section from the command prompt. Also make sure that you're using Python3.7, as listed there.
Your interpreter then would have to just be Python 3.7, which will allow you to import the modules from other Python code
from huobi import RequestClient
# your code