import 'tensorflow.keras' could not be resolved problem - python

I have some problem in my vscode
I can steel import my modules but vscode is saying problems.
enter image description here
In my idea it's because some modules are in pypi and some are in conda-forge
but I can't fix it
enter image description here

Related

Can't install whitenoises library on my django project

I am using the conda environment and I cannot load the white noise library, but it says that the library is installed.
enter image description here
enter image description here[[[[enter image description here](https://i.stack.imgur.com/QcVTw.png)](https://i.stack.imgur.com/PXIy9.png)](https://i.stack.imgur.com/6qMSC.png)](https://i.stack.imgur.com/TNOYx.png)
I try all, but i can't fix this error

Installing Serial library in PyCharm

after PySerial library is installed: enter image description here
I try to Run a simple program, and it says that No module named 'serial' is found.
enter image description here
Thanks in advance.
This may be happening because the location where this package is getting installed is not included in the PATH.
You can try:
Hover on the package name and click on install package pyserial.
OR
Go to settings->Project XYZ->Python Interpreter-> Click on + sign->search and install package from there.
OR
Include the location of installed package in the PATH variable.

cannot import name '_api' from 'matplotlib'

I'm facing the following error while trying to import the matplotlib(Windows10 OS). I have tried uninstalling and reinstalling the package. Nothing seems to be working. Can somebody help me
enter image description here
According to the thread here:
https://github.com/facebook/prophet/issues/1691
You might need to downgrade to the 3.1.3 version of mathplotlib for it to work.

Biopython is successfully installed in anaconda 3 but the module fails to be imported

A variation of this problem was asked before but I'm forced to ask because the solutions given there didn't work for me.
I'm using Jupyter in anaconda 3. First I installed biopython using !pip install biopython. It was successfully installed but when I tied to `import Bio' it returned a ModuleNotFoundError.
Later I used conda install -c anaconda jupyter and conda install -c anaconda biopython in the anaconda prompt to install biopython. They were successfully installed but the same problem remains.
However, if I type `import bio' with a small b then the module error doesn't show up. However, I still can't call any function within the module. Here is an example of the error I'm facing. This is my very first post so I don't have enough reputation to post embed images. I will post external links here.
https://imgur.com/yydzI0y
So I checked if the directory had the folder name with uppercase or lowercase. It was uppercase, so I thought maybe it should be changed to lowercase and I changed. Still the same problem.
Here is my PATH and it seems to include the anaconda directory.
https://imgur.com/v7VeC1f
I really need to use biopython, so please help.
Bio is the correct reference to use.
Try this:
First ensure the name of the package folder is Bio as this is the correct name
dir C:\Users\Asus\anaconda3\Lib\site-packages\*io*
...
06/10/2020 01:12 PM <DIR> Bio
...
Then try this code:
import Bio
from Bio.Blast import NCBIWWW
f=open('smn.fasta').read()
result=NCBIWWW.qblast("blastn","nt",f)

'ImportError: No module named pillow' in PyCharm

I'm getting an error while using PyCharm which doesn't allow me to import the pillow module even though I have it installed as a package in the project interpreter. Any help is greatly appreciated!
http://imgur.com/a/DfjC3
While the name of the package is pillow, it is a replacement for PIL and uses the PIL for the name of the base module
the usual way to use pillow is
from PIL import Image
im = Image.open("filename")
See the tutorial, and the documentation
You try to run code with default Python interpreter (/Library/Frameworks/Python.framework/Versions/3.2/bin/python3). You need to configure PyCharm to run Your code with anaconda (~/anaconda/bin/python)
And now (Like #JamesK say) read Pillow tutorial and documentation:
import PIL not import Pillow
For anybody still having trouble with this, I did the following which solved my problem.
Open up your Project Interpreter (⌘ + , on Mac).
At the bottom of this page you'll see the + symbol to the left of the anaconda logo. This will create a pop-up that allows you to search for available packages.
In this new window, search for 'Pillow'.
Click and Install Package.
You should now be able to use "from PIL import Image" or "import Pillow as pil" etc.
After running this command on your terminal
pip install pillow
and you are sure it was installed, but still having same problem of PIL module not found.
Go to your IDE and make sure existing interpreter is set to python interpreter and not anaconda

Categories