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.
Related
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.
This question is not a duplicate of this question, because I am trying to create an app.
I am currently following this tutorial, but when I try to run my app,
my command prompt prints out this error:
Why does this error happen and how can I solve it? I read through all the answers to the linked question, but none of them are pertinent to my problem.
Please anyone help me, I still haven't found a working solution; I am getting desperate!!!
Edit: I can't just install and uninstall pynput? Idk why it doesn't work because shouldn't pynput come with idle?
Version: 3.74 python idle, most updated version of pyinstaller
The following might help you if you haven't tried them already:
Update pip from the command line
Unistall pyinstaller
Re-install pyinstaller and try it again
If the above does not work, try running the following command in the command line. Make sure there are some print statements in your code to see if it works.
python monitoring_culmination_product.py
If you got a message saying "python is not recognised as an internal or external command" then python might have not been added as an environment path.Try this to fix the issue.
You could always re-install python if things get difficult.(make sure you install the appropriate version 32-64bit)
If the command though executed without a problem. Try to use pyinstaller on another file to see if the problem has to make sure the problem has to do with pyinstaller.
From a personal experience, pyinstaller can be unreliable at times so I put the following line in my projects just to make sure. It might help you too.
import pkg_resources.py2_warn
Disclaimer: Although it is not specified I assume that you are using Windows
You could try to use conda create to get an environment containing all the need dependencies (numpy, etc) and then use pyinstaller as explained in this discussion.
Please fall back to 1.6.8 version of pynput. pip install pynput==1.6.8
Ref : https://stackoverflow.com/a/63721929/14759065
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'm fairly new to programming. I am a student of Mathematics and one of my modules has python programming as part of it. I was told to download python 3.5 and, using cmd and pip, to download the following packages which I did:
matplotlib,
ipython,
notebook,
numpy,
scipy,
After downloading them I entered, in cmd, ipython notebook but an error message saying "The program can;t start because MSVCP140.dll is missing from your compute. Try reinstalling the program to fix this problem." I have tried to reinstall python and the aforementioned packages but the same message keeps popping up. What can I do to fix this?
Sorry if my post is in the wrong section of the forum, this is my first time on Stackexchange.
This is embarrassing to admit, but I just continue to struggle with setting up my Python environment on an Ubuntu install.
Sometimes I get it to work fine. But here's the problem:
I feel like whenever I sit down to do some hobby hacking on a python project, I end up spending hours on end just trouble shooting inconsistencies with my python installation. Right now I keep getting an error message of:
ImportError: cannot import name urandom
when trying to import a module called googleplaces (https://github.com/slimkrazy/python-google-places).
But it's always something that causes me to go on an endless snipe hunt for the proper configuration of this that or the other.
I just want to work on the project, not plumb around endlessly in forums.
Which brings me to my point: How do I completely nuke my existing python setup (including virtualenv, pip, easy_install, etc. etc.) and just start from a completely clean slate? I have already tried reinstalling everything python from synaptic, but no success, still getting error.
UPDATE: I've reinstalled virtualenv and that seems "ok" so far. Found that my import error is a permissions problem, if I import in the interactive using sudo, it passes fine. How should I be correcting my permissions so I don't have to run sudo? (Probably close this and start a new question.)