No module named 'django_cas_ng' - python

I am trying to run a webpage using PyCharm, but when I run the server, I see an error saying: ModuleNotFoundError: No module named 'django_cas_ng'.
I looked up for solutions on sources like this, this, and this. I believed I needed to install specific modules but none of them worked

To solve this problem, I used pip install django-cas-ng multiple times, but it did not go through. I restarted PyCharm and used the same line of code, it worked this time.

Related

ModuleNotFoundError: No module named 'django-quill' Python3

I am trying to run someone else's code without a requirements.txt file and it says: ModuleNotFoundError: No module named 'django-quill. I tried to do pip install django-quill in a virtual env but I still get the same error. What am I missing here?
As it turns out, I had to run pip install django-quill-editor in order for the code to work as expected. I am still not sure why the original command did not work but this resolved the issue for me.
You can find the official setup guide for Django quill here: https://github.com/LeeHanYeong/django-quill-editor#setup

Why Python does not recognize "kivy" module for me?

After I install the "kivy" python module, the python console and IDEs don't recognize it as a module, as if it doesn't exist.
ModuleNotFoundError: No module named 'kivy'
I do the installation normally like any other. I reinstalled the module several times and looked for all possible solutions, but nothing. Also, pip list and pip3 list tells me the module is there. What should I do?
When I completely reinstalled the system the problem was solved.

ModuleNotFoundError: No module named 'zipfile' when using pip

I'm new to Python and I have installed multiple versions (Anaconda3 and Python 3.7.4) on my Mac.
My pip is not working. When I run any pip command, everything appears to be importing properly. But it gets the last line, import zipfile, and I get the message:
ModuleNotFoundError: No module named 'zipfile'
I have been Googling for hours and I can't seem to find a solution.
My Python now lives in the Anaconda directory /users/NAME/opt/anaconda3/.
Ultimately, I would like to start from scratch and just reinstall Python 3.7.4 again, so it's all nice and clean. I can't uninstall Anaconda because I get the same ModuleNotFoundError: No module named 'zipfile'.
I have also tried to install the module zipfile and that doesn't work either.
Can someone help?
Thanks
Thanks everyone for your help so far. I am really new to Python, so I don't think I explained myself properly.
UPDATE: I think I have fixed my problem. Pip was looking for the file zipfile, so I downloaded https://pypi.org/project/zipfile36/#files and changed the name of zipfile36.py to zipfile.py.
Seems like it did the trick.

errors with import library in Anaconda

I am facing a strange error. I have installed pyrenn module with pip install in conda environment and solved an ANN problem successfully. But when I restarted the kernel in jupyter or spyder, I am not able to even import the module which shows error: module 'pyrenn' has no attribute 'CreateNN'. But it definitely has the module and it worked last time.
what may be the possible problem?
If you look at your screenshot it shows a path ~/ANN study/pyrenn/pyrenn.py. So not only you are creating a conflicting folder name pyrenn you are also creating a conflicting importable file pyrenn.py.
Follow the thumb rule of not naming the folders and your files which conflict with modules that you will uses or are existing.

Heroku ImportError: No module named tweepy - but it's installed and runs fine locally

I've made a very simple Twitter bot in Python using the Tweepy library. Everything works beautifully locally and it tweets when I run the correct script exactly as it's supposed to. However, I'd like to automate this so that it tweets a couple of times a day, so have tried using the Heroku Scheduler for this.
I'm able to push to Heroku with no problems, but when I try to run the worker on Heroku I get this error message (which means of course the scheduler isn't working either since it's running the same process):
Running `worker` attached to terminal... up, run.8157
/app/.bash_profile: line 6: parts: command not found
Traceback (most recent call last):
File "/app/workspace/botlovesyou/lovescript.py", line 4, in <module>
import tweepy, time
ImportError: No module named tweepy
So, erm...what now? I've Googled and found this but am not sure how to actually fix it. This question looks deceptively similar but I don't have the other missing dependency that caused his issue.
I've tried running pip install tweepy again but of course it says 'Requirement already satisfied'. I've tried pip uninstalling it then pip installing it again - it reinstalls no problem, but I get the same error when it's on heroku. I've also tried installing the buildpack mentioned at the link above but it failed to build and wouldn't allow me to push so I removed it.
EDIT: I've now also tried git cloning and installing tweepy using setup.py. Again, installation ran with no errors but Heroku still says there's no module named Tweepy.
Tweepy is definitely installed in the site-packages directory. What am I missing?
Many thanks.
Problem resolved (this problem, anyway).
Install was aborting when it reached PIL in the requirements.txt file - it can't be installed via pip and was just skipping installing everything after it. I don't require PIL for this project so just removed it from requirements (I don't really know why it was in requirements in the first place, I think it was a nitrous.io preinstall). Very simple solution in this case.
Edited to add - on starting a new Python box on Nitrous, PIL was preinstalled correctly. So I think my initial install might have been corrupted.
Ugh. Edited again. Nitrous seems to have eaten PIL again, or maybe Heroku has. Same error. Again removed it from requirements.

Categories