No module named admin_view_permission, CircleCI? - python

When I run my Django project on CircleCI I get the following error: "ModuleNotFoundError: No module named 'admin_view_permission'"
The project runs with no problems locally on my computer. I added the module admin_view_premissions, to settings, from this page: https://github.com/ctxis/django-admin-view-permission
Then I ran "pip install django-admin-view-permission", and it worked fine. The migration also did not have any problems.
Does anyone know why CircleCI is not able to find the module?
Thank you for your time!

I had to write the package in the Pip-file by using: pipenv install django-admin-view-permission

Related

ModuleNotFoundError: No module named 'modeladapter'

So I want to run a repo i cloned from github project that is used to segregate the medical reports data and categorise it using machine learning and an error occurred.
Here is the relevant code:
import modeladapter as ModelAdapter
VSCode screenshot:
This means that the module does not exist on your PC in the area where Python modules are installed. You should try to install the module using pip and it should resolve I think. I don't know what the module is though, I tried googling it and couldn't find anything, so maybe somewhere on the GitHub repo page it says what the required modules are and where to get them?

ModuleNotFoundError: No module named 'mysql' with mysql-connector-python already installed

I'm trying to connect my python scripts to an MySQL or MariaDB Server on my RaspberryPi4.
My python script right now just contains import mysql.connector. But when I try to start it via sudo python3 startdb.py I just get import mysql.connector ModuleNotFoundError: No module named 'mysql' as an error.
I get an other error, when I start the script via sudo python startdb.py: import mysql.connector ImportError: No module named mysql.connector.
I searched for a solution on many sites or forums. I mostly just found various versions of pip install mysql-connector-python (also with pip3, mysql-connector-python-rf or mysql-connector) to run but none of them worked for me. The only difference I recognized is that I previously got the error ModuleNotFoundError with both sudo python and sudo python3, but now I only get it with sudo python3.
Does anyone know how to solve this?
Could the fact that my script isn't in a sub-directory of /home/pi/, but instead of /home/, be the problem?
Edit: I just tried executing the script via the desktop mode using my mouse and just clicking on run and it worked. But when I'm using the command line in desktop mode or with a SSH session it doesn't work.
Another Edit: It looks like when I'm starting the script without sudo it'll work just fine. Don't actually know why's that, but I'm good for now. But would be very interesting to know and understand why the sudo makes it "crash".
Thanks and happy to hear some solutions :D
Cooki
raspbian give user mode in running, just in Desktop gives some permission to user for run app as root to access all necessary attributes , use sudo with all initial steps when you download and install project package's

Python Module Installation from Folder

I downloaded a project and am running through and installing all dependencies. At first I had errors regarding No module named utm and No module named paho. I solved these issues by going to C:\Users\me and using pip install paho-mqtt and pip install utm. Easy enough.
I then have this line "from mfa_msgs import Mission, WaypointList, MissionControl, ControlCommand, Status" and am getting a No module error here. mfa_msgs is a folder found in the project I downloaded that contains the Mission, WaypointList, etc. files. Where do I need to put the mfa_msgs folder in order to be able to access them?
Appreciate your time!

problem with manage.py: No module named 'django'

When I tried to execute python manage.py runserver, it failed due to the SyntaxError. Then I tried it with python 3, it still didn't help and said "No module named 'django'".
However, when I searched the packages in my virtualenv, it seemed that django is inside this virtualenv.
It seems like it's using the local packages but not the packages inside the virtualenv.
Can someone help me resolve this problem? Thx

PyBuilder "ModuleNotFoundError: No module named" when running

I'm playing around with PyBuilder and I must be either missing something, or misunderstanding how PyBuilder works. In my test application, I'm importing the pdfrw library. I had installed it via pip and everything was working fine. However, I decided to try starting over in a new venv and not installing via pip first to see if PyBuilder pulled in the dependency. When I run pyb it runs fine, no errors, but when I try to run the code from the target directory it gives me an error of "ModuleNotFoundError: No module named pdfrw".
I'm used to using Maven and Gradle for Java development but this is my first foray into dependency management for Python. Can anyone let me know if I'm just misunderstanding what PyBuilder can do or if I'm just missing something in the configuration? Here's a copy of the simple build.py script that pyb is referencing:
from pybuilder.core import init, use_plugin
use_plugin("python.core")
use_plugin("python.install_dependencies")
default_task = "publish"
#init
def initialize(project):
project.depends_on('pdfrw')
Any help would be greatly appreciated.
Thanks,
Chris
Try to use
pyb install_dependencies
According to http://pybuilder.github.io/documentation/tutorial.html#WritingUnitTests

Categories

Resources