I cant understand what's wrong. I'm using jupyterlab to make a CNN model for school but I get this error when running my code which idk wat its is. When I search online the solutions don't make sense to me.
I reinstalled my conda prompt and made new environment for my code but its still the same.
make virtual environment and then install the tensorflow ! I hope its Work.
Related
So I am trying to create a chatbot in pycharm so I set up all the code and when I tried to run it, it gives me a error message saying can't find 'main' module in 'C:\Users
So I tried fixing it by setting up a new folder called virtual environment yet it gives me the same error
On the off chance it doesn't give me that error it tells me it cannot input chattterbot so I go to project interpreter to try and install it, it gives me the error message
Error occurred when installing package 'Chatterbot' I dont get why this does it while chatterbot-corpus works perfectly fine.
I tried as I said making a new virtual environment but that didnt work so after switching the new virtual environment I made and trying to put chatterbot in manually it didnt work and nothing showed. So going back to the original environment that was created when I started this project. But the same thing keeps happening it just wont install even if other programs install no problem. I looked this problem up and I found one post saying it might be setuptools fault so I down graded to the version that they said it would work but to no avail. It always comes up as Error occurred while installing package 'Chatterbot' I dont know if its something wrong with the files on my computer or the way im trying to install chatterbot. The major problem that really stumps me is that this seems to be a problem for only chatterbot and nothing else and I cannot figure out for the life of me why.
I keep getting this error while trying to import pytorch in jupyter notebook
import torch
AttributeError: function 'AddDllDirectory' not found
this error occur only when I try installing pytorch in anaconda (I used both command to install pytorch pip and conda, I also tried installing only the cpu version and nothing changed, i still get the same error while trying to import it)
I searched the internet and found nothing remotely close to my problem.
is there's a way I can fix this error?
thanks in advance
I fixed the issue by installing the file (KB2533623) from
Here (for windows 7 users). this file apparently contains the missing "AddDllDirectory" function.
Posting this answe in case someone ran into the same problem.
I wanted to change my python compiler to "newer" one (within one project) and use some additional packages with conda. After the installation all my packages worked fine and I could use the console, however matplotlib.pyplot fails to import since then. And throws the following error: app = QtGui.QApplication([" "])
AttributeError: module 'PyQt5.QtGui' has no attribute 'QApplication'
After doing some research on this I found this one: link
It is suggesting to change inputhooks.py (on line 513 and change GUI_QT:enable_qt4 to GUI_QT: enable_qt5 4 to 5)
As it is a company machine, I can't have admin rights to overwrite things within PyCharm.
Can you recommend a better solution to avoid this?
Why is this popping up?
ErrorLogScreenshot
Also I tried to install the newer version of pyqt but that didn't fix the problem.
In the same time
Within pydev the interactiveshell.py fails as well. with the following error message:self.showtraceback(running_compiled_code=True)
TypeError: showtraceback() got an unexpected keyword argument 'running_compiled_code'
I understand it gets an argument which it is not expecting. I did some research on this one as well and some could fix it by deleting a stale a corresponding .pyc file (I couldn't find one at the same location as the initial file only interactiveshell.py)
Below this blog regarding pydev the conversation never went further
https://github.com/ipython/ipython/issues/10687
Is there a way to fix it?
I am kind of new to Python and don't quite understand the heart of it at this depth so any help is appreciated.
Thanks,
Anna
For anyone having the same issue, I have solved this problem by switching to qt and pyqt 4. To do so, follow the following procedure:
conda remove qt
conda install qt=4
conda install -c anaconda pyqt=4.11.4
conda install matplotlib --no-update-dependencies
If you are not using a virtual environment, you might also have to remove anaconda navigator before installing new packages:
conda uninstall anaconda-navigator
At the beginning of your program, switch matplotlib backend:
import matplotlib.pyplot as plt
plt.switch_backend('Qt4Agg')
Inspired by this solution.
After updating PyCharm all issues seem to have been resolved. (I was using versin 2017.1)
The show traceback error was due to pydev, and the new release fixes it.
As well as the GUI problem.
I was able to solve it by finding the file, and both messages disappeared, and matplotlib seems to work fine again.
Under this folder (I named my environment py35):
C:\Users\myusername\AppData\Local\Continuum\anaconda3\envs\py35\Lib\site-packages\IPython\core__pycache__
I found the file: interactiveshell.cpython-35.pyc and deleted it -
(This solves the problem only on Python 3.5)
I know this question has been asked before but I have not been able to fix the issue with the responses, hence posting this one.
I get this error :
ModuleNotFoundError: No module named 'keras'
when I import keras.
1) I created a new env ( python 3.5 ) and insatlled tensorflow,theano and keras.
2) I can see the package Keras when I list the packages in this env
3) I tried uninstalling and then install Keras back ( using pip3 as well , as suggested in another forum)
4) I can see keras folder under /site-packages
Not sure what I should be doing to get it to work. TIA.
I ran into this issue on a windows laptop. the other answer didn't help me... here's what I did to get it working:
first I had to stop using cygwin. the various commands are a bit wonky unless you are using cmd.exe.
second, I read this article and follow the instructions to essentially install Jupyter within the env I wanted it to play with.
https://www.quora.com/How-can-I-work-with-Keras-on-a-Jupyter-notebook-using-Tensorflow-as-backend
hopefully this will help someone!
I have got a strange issue.
I am now using graphlab/numpy to develop a project via Pycharm 5. OS is Mac OS 10.11.5. I created a p2.7 virtual environment for the project. Programme runs well. But after I install ipython, I can no longer import graphlab and numpy correctly.
Error message:
AttributeError: 'module' object has no attribute 'core'
System keeps telling that attribute ‘core' and 'connect' are missing. But I am pretty sure that they can be found in graphlab/numpy folders, and no duplicates.
Project runs all right in terminal. Now I have to uninstall ipython. Then everything is ok again.
Please kindly help.
Please remember that console applications and GUI application do not share the same environment on OS X.
This also means that if you install a Python package from the console, this would probably not be visible to PyCharm.
Usually you need to install packages using PyCharm in order to be able to use them.
Upgrading pip itself then reinstalling worked for me