-
Notifications
You must be signed in to change notification settings - Fork 55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ModuleNotFoundError: No module named 'twitter' #6
Comments
Recommendation is to install your dependencies into a virtual environment |
This does not solve my issue... still |
Can you reproduce how did you install the project requirements for us? |
Did you change any folder names? sys.path.append(os.path.abspath('./modules')) This should import the location of all of the modules into the script. |
I've tried it on a fresh installation of Linux Mint 21.1 in Virtual Box: v@v-VirtualBox:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Linuxmint
Description: Linux Mint 21.1
Release: 21.1
Codename: vera
v@v-VirtualBox:~$ python3 --version
Python 3.10.6 Installation: @v-VirtualBox:~$ git clone https://github.com/jakecreps/poastal
Klone nach 'poastal' …
remote: Enumerating objects: 178, done.
remote: Counting objects: 100% (77/77), done.
remote: Compressing objects: 100% (76/76), done.
remote: Total 178 (delta 29), reused 0 (delta 0), pack-reused 101
Empfange Objekte: 100% (178/178), 150.11 KiB | 3.00 MiB/s, fertig.
Löse Unterschiede auf: 100% (65/65), fertig.
v@v-VirtualBox:~$ cd poastal/
v@v-VirtualBox:~/poastal$ pip install -r requirements.txt
[ ... ]
Successfully installed Jinja2-3.1.2 MarkupSafe-2.1.2 Werkzeug-2.2.3 flask-2.2.3 flask_cors-3.0.10 itsdangerous-2.1.2
v@v-VirtualBox:~/poastal$ python3 backend/poastal.py
Traceback (most recent call last):
File "/home/v/poastal/backend/poastal.py", line 7, in <module>
from twitter import twitter_email
ModuleNotFoundError: No module named 'twitter' I've added ['/home/v/poastal/backend', '/usr/lib/python310.zip', '/usr/lib/python3.10', '/usr/lib/python3.10/lib-dynload', '/home/v/.local/lib/python3.10/site-packages', '/usr/local/lib/python3.10/dist-packages', '/usr/lib/python3/dist-packages', '/usr/lib/python3.10/dist-packages', '/home/v/poastal/modules'] Only solution is to load all the local modules with |
weird. Was trying to troubleshoot why I never get a prompt to enter an email and I did notice this... If I run the poastal.py from the poastal directory like this then I get this module error. But if I cd into backend and then run it it seems to start fine (but I can never find a place to enter the email as the web page just shows "no email provided." $ python ./backend/poastal.py vs $ python ./poastal.py
|
So the problem is that if you don't run So you may close this issue or you can add my workaround |
Hi and thanks for the great work!
I've got an issue with loading the local twitter module from the modules folder:
Workaround for me was to add the modules folder to the import command in the
poastal.py
And now it's working :)
The text was updated successfully, but these errors were encountered: