I am using Flask-Upload module and for that I have installed Flask-Upload packages from
pip install -e "git://github.com/FelixLoether/flask-uploads#egg=Flask-Uploads"
and import module like this:
from flask.ext.uploads import UploadSet, configure_uploads, IMAGES,UploadNotAllowed
but it gives me error that ImportError: No module named flask.ext.uploads
pls tell me what I am doing wrong here?
Here is pip freeze result :
Flask==0.10.1
Flask-SQLAlchemy==1.0
-e git://github.com/FelixLoether/flask-uploads#d73fb8c8a4859019265e62f27e168a8bb09abfd5#egg=Flask_Uploads-dev
Jinja2==2.7
MarkupSafe==0.18
MySQL-python==1.2.4
ProxyTypes==0.9
PyYAML==3.10
SQLAlchemy==0.9.3
Your git address is wrong. Just use:
pip install flask-uploads
Besides, change imports to this:
from flask_uploads import UploadSet, configure_uploads
Just do:
pip install Flask-Uploads
In past I had a similar problem, but It was a diferent version installed from a version in code, and the message was the same: ImportError: No module named flaskext.uploads. I fixed after do this (two options):
Install an old version of Flask-Uploads in your virtualenv:
pip install Flask-Uploads==0.1.3 and keep the imports: from flaskext.uploads in your code.
Install or update to the last version of Flask-Uploads and change the imports:
pip install Flask-Uploads --upgrade and change the imports for: from flask.ext.uploads in your code. Realize that now have a dot (.) flask.ext
Related
So i just installed python3.10 on Ubuntu 20.04 and made it default. After that tried to run a program which imports pygame and get an Error `
" ModuleNotFoundError: No module named 'pygame.base'
After a little bit of research the solution might be
pip3 uninstall pygame
and to reinstall it, but then i get that error
ImportError: cannot import name 'html5lib' from 'pip._vendor' (/usr/lib/python3/dist-packages/pip/_vendor/init.py)
`which pip3 and which python3 give me 2 different directionaries
Now my question: How do i get them in the same that the pip points at the correct python ?
`
the answer exist in this stack overflow url :ImportError: cannot import name 'html5lib' from 'pip._vendor' (/usr/lib/python3/dist-packages/pip/_vendor/__init__.py)
and also you can use something like that for use pip with correct python version, for instanse:
python3 -m pip install <package_name_you_want>
I have seen this issue with some resolutions already, but none have worked for my issue. I have pip installed the latest version of office365(v 2.2.0) to my knowledge using the command:
pip install office365-rest-client
I am trying to import using the following lines of code:
from office365.runtime.auth.authentication_context import AuthenticationContext
from office365.sharepoint.client_context import ClientContext
from office365.sharepoint.files.file import File
I receive the following error:
ModuleNotFoundError: No module named 'office365'
Just to test it out, I uninstalled and reinstalled pandas, then successfully imported pandas into my project.
Install this
pip install Office365-REST-Python-Client
pip install office365
After that, restart your IDE and errase and write again the imports. I no have idea why this worked for me
ATTENTION - You must make the letter O lowercase in both install commands, as below. Capital O does not work.
pip install office365-REST-Python-Client
pip install office365
You also need to install the office365 library as well as office365-rest-client
pip install office365
I am trying to import the module dnspython in a python 3.6 script using import dnspython.
pip3 freeze shows that the package is installed but I keep getting the error ModuleNotFoundError: No module named 'dnspython'
I have tried:
pip3 install dnspython
uninstalling and reinstalling with pip3
pip3 install git+https://github.com/rthalley/dnspython
Cloning the package from github and installing with sudo python setup.py install
pip3 install dnspython3 and using import dnspython3 in the script
Copying the dns folder of the cloned package in the site-packages folder
I am aware of this post for python 2.7 but none of the solutions worked.
The problem was import dnspython. Changing it into import dns worked fine.
Some test code:
import dns
result = dns.resolver.query('google.com', 'A')
for ipval in result:
print('IP', ipval.to_text())
# Output: IP {your ip}
It worked for me (Python 3.8.5):
pip install dnspython3
code:
import dns
from dns import resolver
result = resolver.resolve('google.com')
for ipval in result:
print('IP', ipval.to_text())
I'm trying to import zenipy for windows 10 after reading and experiencing that zenity-python simply will not work. So I installed zenipy and got the 'successfully installed' message from the command line but now when trying to import it I get :
ModuleNotFoundError: No module named 'gi'
in PyCharm I am writing:
from zenipy import *
Please can someone help me to import zenipy and tell me what is going wrong?
Looks like it's not installed or don't have the dependencies that need. Try pip uninstall zenipy and then pip install zenipy.
Or download and install the repo on GitHub.
$ git clone https://github.com/poulp/zenipy.git
$ cd ./zenipy
$ python setup.py install
I'm trying to install tlslite. After installed the module I've tried to test it and I receive this error:
from .checker import Checker
ImportError: No module named checker
I've checked on my pip module list and checker is installed...
Any idea?
Thanks!
Assuming you installed tlslite correctly, try this:
>>> from tlslite.checker import Checker
If that doesn't work, check that tlslite is in your site packages
To work with tlslite I recommend to use a virtualenv and install TlsLite inside:
cd ~/virtualenv/ # <- all my virtualenv are here
virtualenv myvenv
source ~/virtualenv/myvenv/bin/activate
pip install -q -U pip setuptools # ensure last version
pip install tlslite
With that in hand, you can use the Checker:
$ python
>>> from tlslite.checker import Checker
>>>
Et voilà !