Trying below code to check suds working
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from suds.client import Client
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "suds.py", line 2, in <module>
from suds.client import Client
ImportError: No module named client
>>> exit()
When i try to install it again getting below error
sagarnig#sagarnig-HCL-Desktop:~$ sudo pip install suds
Requirement already satisfied (use --upgrade to upgrade): suds in /usr/local/lib/python2.7/dist-packages
Cleaning up...
after using -I
sagarnig#sagarnig-HCL-Desktop:~$ sudo pip install -I suds
[sudo] password for sagarnig:
Downloading/unpacking suds
Downloading suds-0.4.tar.gz (104kB): 104kB downloaded
Running setup.py (path:/tmp/pip_build_root/suds/setup.py) egg_info for package suds
Installing collected packages: suds
Running setup.py install for suds
/usr/bin/python -O /tmp/tmpmktuLL.py
removing /tmp/tmpmktuLL.py
Successfully installed suds
Cleaning up...
sagarnig#sagarnig-HCL-Desktop:~$ python
Python 2.7.6 (default, Mar 22 2014, 22:59:56)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from suds.client import Client
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "suds.py", line 2, in <module>
from suds.client import Client
ImportError: No module named client
Try
sudo pip install -I suds
As per this answer.
It's the capitalized Client. You should use:
from suds.client import Client
Related
list the packages beginnig at s.
pip list | grep ^s
setuptools 56.0.0
six 1.12.0
sniffio 1.2.0
socks 0
Why the version number is zero?
python3
Python 3.9.6 (default, Jul 14 2021, 09:15:03)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socks
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'socks'
debian#debian:~$ pip3 install socks
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: socks in /usr/local/lib/python3.7/dist-packages (0)
WARNING: You are using pip version 21.1.2; however, version 21.1.3 is available.
debian#debian:~$ python3
Python 3.9.6 (default, Jul 14 2021, 09:15:03)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import socks
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ModuleNotFoundError: No module named 'socks'
What is the matter with package----socks in my python?
pip might not be pointing to python3 ?
python3 -m pip list | grep ^s
selenium 3.141.0
setuptools 56.0.0
six 1.16.0
sniffio 1.2.0
socks 0
If you're unsure you have socks installed, use:
pip install socks
in the command prompt. That way it will either tell you that it's installed or install it for you
I have installed zmq and pyzmq.But I can't import pyzmq.
>>> Successfully installed pyzmq
Cleaning up...
hepeng#hp:~$ python
enter code here
Python 2.7.6 (default, Jun 22 2015, 17:58:13)
[GCC 4.8.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import pyzmq
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pyzmq
But I can import zmq.
>>> import zmq
>>>
So why?Thanks.
pyzmq is the PyPI package installer name, but the actual root package is named and imported as zmq. This is just how some Python packages work; PyYAML is another example, being installed under the name PyYAML, but imported as yaml.
If you take a look at the zmq docs or pyzmq API, you'll notice all the Python examples import as zmq.
I installed mandrill using pip:
(venv)Jhons-MacBook-Pro:venv jhonjairoroa87$ pip install mandrill
I got this result:
Downloading/unpacking mandrill
Downloading mandrill-1.0.57.tar.gz
Running setup.py (path:/private/var/folders/x3/st96cn215h915kqwlcrmtspw0000gn/T/pip_build_jhonjairoroa87/mandrill/setup.py) egg_info for package mandrill
Requirement already satisfied (use --upgrade to upgrade): requests>=0.13.2 in /usr/local/lib/python2.7/site-packages (from mandrill)
Requirement already satisfied (use --upgrade to upgrade): docopt==0.4.0 in /usr/local/lib/python2.7/site-packages (from mandrill)
Installing collected packages: mandrill
Running setup.py install for mandrill
changing mode of build/scripts-2.7/mandrill from 644 to 755
changing mode of build/scripts-2.7/sendmail.mandrill from 644 to 755
changing mode of /usr/local/bin/mandrill to 755
changing mode of /usr/local/bin/sendmail.mandrill to 755
Successfully installed mandrill
Cleaning up...
But when I try to use it, fails:
(venv)Jhons-MacBook-Pro:venv jhonjairoroa87$ python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mandrill
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named mandrill
>>>
>>> import sendmail.mandrill
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named sendmail.mandrill
Has anyone had this problem?
I uninstalled it using
pip uninstall mandrill
and reinstalled it using the python -m option:
sudo python -m pip install mandrill
Now it works perfectly.
(venv)Jhons-MacBook-Pro:python_mandrill jhonjairoroa87$ python
Python 2.7.6 (default, Sep 9 2014, 15:04:36)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.39)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import mandrill
>>>
I'm trying to install pyOpenSSL using pip, python version is 2.7, OS is linux.
After pyOpenSSL installed, when I tried to import the module in python, I got the following error:
Python 2.7.5 (default, Jun 27 2013, 03:17:39)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import OpenSSL
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/site-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/local/lib/python2.7/site-packages/OpenSSL/SSL.py", line 84, in <module>
OP_NO_TICKET = _lib.SSL_OP_NO_TICKET
AttributeError: 'FFILibrary' object has no attribute 'SSL_OP_NO_TICKET'
>>>
I tried to uninstall pyOpenSSL and install it again, but got the same error.
This is because low version pyopenssl has not defined SSL_OP_NO_TICKET。
clone the latest pyopenssl from https://github.com/pyca/pyopenssl.git and install it, then that'll be fine. no thks.
The fix is described here:
https://github.com/pyca/pyopenssl/issues/130
Indeed, you can apply it manually (not really recommended, but easy)
Or download archive from github
The link to the fix: https://github.com/pyca/pyopenssl/commit/e7a6939a22a4290fff7aafe39dd0db85157d5e05
And the fix applied to SSL.py
-OP_NO_TICKET = _lib.SSL_OP_NO_TICKET
+try:
+ OP_NO_TICKET = _lib.SSL_OP_NO_TICKET
+except AttributeError:
+ pass
I am on Centos 6 Linux
When i try this
Python 2.7.3 (default, Nov 23 2012, 18:02:22)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
(InteractiveConsole)
>>> import readline
Traceback (most recent call last):
File "<console>", line 1, in <module>
ImportError: No module named readline
>>>
I try to install python readline with pip and i get this
virtualenv/bin/pip-2.7 install readline
Requirement already satisfied (use --upgrade to upgrade): readline in ./virtualenv/lib/python2.7/site-packages/readline-6.2.4.1-py2.7-linux-x86_64.egg
Cleaning up...
what should i do
EDIT:
I tried this as well
[myhost]$ virtualenv/bin/python2.7
Python 2.7.3 (default, Nov 23 2012, 18:02:22)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named readline
>>>
I tried all that
(virtualenv)[aaaaaa]$ source virtualenv/bin/activate
(virtualenv)[aaaaaa]$ virt
virtualenv/ virtualenv-clone virtualenvwrapper.sh
virtualenv-2.7 virtualenvwrapper_lazy.sh virt-what
(virtualenv)[aaaaaa]$ virtualenv/bin/pip
pip pip-2.7
(virtualenv)[aaaaa]$ virtualenv/bin/pip install readline
Requirement already satisfied (use --upgrade to upgrade): readline in ./virtualenv/lib/python2.7/site-packages/readline-6.2.4.1-py2.7-linux-x86_64.egg
Cleaning up...
(virtualenv)[aaaaa]$ python
Python 2.7.3 (default, Nov 23 2012, 18:02:22)
[GCC 4.4.6 20120305 (Red Hat 4.4.6-4)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import readline
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named readline
>>>
I tried all vitual env and activating as well. But again i get same error
You need to actually activate the environment you want to use, not just run the python binary from the enviroments bin folder:
$ source /path/to/envirn/bin/activate
$ pip install readline
$ python
> import readline
A workaround that worked for me is to re-install readline:
$ source /path/to/env/bin/activate
$ pip uninstall -y readline
Uninstalling readline-6.2.4.1:
Successfully uninstalled readline-6.2.4.1
$ pip install readline
Collecting readline
Installing collected packages: readline
Successfully installed readline-6.2.4.1