pip error code 1 when installing pyopenssl - python

Hi I am trying to install pyopenssl so i can use scrapy. When i run the installation i get this error with pip. I also get the same error when trying to install scrapy...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/hy/76g5m82s4nx4b8f4m1tzdd9h0000gn/T/pip_build_joegavin/cryptography
Storing debug log for failure in /Users/joegavin/.pip/pip.log
here is my pip list incase i'm missing something
apptools (4.2.1)
argcomplete (0.6.7)
astropy (0.3)
atom (0.3.7)
backports.ssl-match-hostname (3.4.0.2)
beautifulsoup4 (4.3.1)
binstar (0.4.4)
biopython (1.63)
bitarray (0.8.1)
blaze (0.4.2)
blz (0.6.1)
bokeh (0.4.1)
boto (2.25.0)
casuarius (1.1)
cdecimal (2.3)
chaco (4.4.1)
colorama (0.2.7)
conda (3.4.2)
conda-build (1.3.1)
configobj (4.7.2)
cubes (0.10.2)
Cython (0.20.1)
DataShape (0.1.1)
distribute (0.7.3)
docutils (0.11)
enable (4.3.0)
enaml (0.9.1)
envisage (4.4.0)
Flask (0.10.1)
future (0.11.2)
gevent (1.0)
gevent-websocket (0.9.2)
gevent-zeromq (0.2.2)
greenlet (0.4.2)
grin (1.2.1)
h5py (2.2.1)
ipython (2.0.0)
itsdangerous (0.23)
jdcal (1.0)
Jinja2 (2.7.2)
keyring (3.3)
kiwisolver (0.1.2)
llvmpy (0.12.3)
lxml (3.3.5)
MarkupSafe (0.18)
matplotlib (1.3.1)
mayavi (4.3.1)
MDP (3.3)
mock (1.0.1)
netCDF4 (1.0.8)
networkx (1.8.1)
nltk (2.0.4)
nose (1.3.0)
numba (0.12.1)
numexpr (2.3.1)
numpy (1.8.0)
openpyxl (2.0.2)
pandas (0.13.1)
patsy (0.2.1)
pep8 (1.4.6)
PIL (1.1.7)
pip (1.5.6)
ply (3.4)
psutil (1.2.1)
py (1.4.20)
PyAudio (0.2.7)
pycosat (0.6.0)
pycparser (2.10)
pycrypto (2.6.1)
pycurl (7.19.0)
PyExcelerate (0.6.1)
pyface (4.4.0)
pyflakes (0.7.3)
Pygments (1.6)
pyinstall (0.1.4)
PyInstaller (2.1)
pykit (0.2.0)
pyparsing (2.0.1)
PySAL (1.6.0)
pysam (0.6)
pytest (2.5.2)
python-dateutil (1.5)
pytz (2013b)
PyYAML (3.11)
pyzmq (2.2.0.1)
redis (2.9.1)
requests (2.2.1)
rope (0.9.4)
scikit-image (0.9.3)
scikit-learn (0.14.1)
scipy (0.13.3)
setuptools (5.1)
six (1.5.2)
Sphinx (1.2.1)
spyder (2.2.5)
SQLAlchemy (0.9.2)
statsmodels (0.5.0)
sympy (0.7.4.1)
tables (3.1.0)
tornado (3.2)
traits (4.4.0)
traitsui (4.4.0)
ujson (1.33)
virtualenv (1.11.5)
VTK (5.10.1)
Werkzeug (0.9.4)
wsgiref (0.1.2)
xlrd (0.9.2)
XlsxWriter (0.5.2)
xlwt (0.7.5)
I've tried updating setup tools, reinstalling pip. I'm on OSX can anybody help? Thanks
UPDATE : Pastebin for pip.log : http://pastebin.com/MTNrR0n5

Error code 1 sometimes occurs due to lack of permissions. If you have an admin account, try prefacing your command with sudo.

Perhaps your Python lacks openssl support?
You can find out:
python
>>> import socket
>>> hasattr(socket, 'ssl')
True
If socket doesn't have the ssl attribute, you don't have the needed capabilities.
AFAIK, openssl support must be selected for compilation of the Python interpreter and cannot be installed afterwards.

Related

While instaling Buildozer for kivy i had an error saing "zipp is missing"

It's been several times that I try to install Buildozer to convert my kivy application to APK.
I use a version of Linux from the Window Store.
After downloading all the dependencies,
I launch the install of Buildozer with the command: sudo python
setup.py install
And I get an error.
I follow this method: https://kivy.org/doc/stable/guide/packaging-android.html
Installed /usr/local/lib/python2.7/dist-packages/buildozer-1.0.1.dev0-py2.7.egg
Processing dependencies for buildozer==1.0.1.dev0
Searching for zipp>=0.4
Reading https://pypi.python.org/simple/zipp/
Downloading https://files.pythonhosted.org/packages/ce/8c/2c5f7dc1b418f659d36c04dec9446612fc7b45c8095cc7369dd772513055/zipp-3.1.0.tar.gz#sha256=c599e4d75c98f6798c509911d08a22e6c021d074469042177c8c86fb92eefd96
Best match: zipp 3.1.0
Processing zipp-3.1.0.tar.gz
Writing /tmp/easy_install-7EAeC9/zipp-3.1.0/setup.cfg
Running zipp-3.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-7EAeC9/zipp-3.1.0/egg-dist-tmp-EWghGG
File "build/bdist.linux-x86_64/egg/zipp.py", line 217
def open(self, mode='r', *args, pwd=None, **kwargs):
^
SyntaxError: invalid syntax
zip_safe flag not set; analyzing archive contents...
Removing /usr/local/lib/python2.7/dist-packages/zipp-0.0.0-py2.7.egg
Moving zipp-0.0.0-py2.7.egg to /usr/local/lib/python2.7/dist-packages
zipp 0.0.0 is already the active version in easy-install.pth
Installed /usr/local/lib/python2.7/dist-packages/zipp-0.0.0-py2.7.egg
error: The 'zipp>=0.4' distribution was not found and is required by importlib-resourcese
I managed to install zipp independently but the error is still there
If i do : pip3 list
i get :
appdirs (1.4.3)
asn1crypto (0.24.0)
attrs (17.4.0)
Automat (0.6.0)
blinker (1.4)
certifi (2018.1.18)
chardet (3.0.4)
click (6.7)
cloud-init (19.4)
colorama (0.3.7)
command-not-found (0.3)
configobj (5.0.6)
constantly (15.1.0)
cryptography (2.1.4)
Cython (0.29.16)
distlib (0.3.0)
distro-info (0.18ubuntu0.18.04.1)
docutils (0.16)
filelock (3.0.12)
httplib2 (0.9.2)
hyperlink (17.3.1)
idna (2.6)
importlib-metadata (1.6.0)
importlib-resources (1.4.0)
incremental (16.10.1)
Jinja2 (2.10)
jsonpatch (1.16)
jsonpointer (1.10)
jsonschema (2.6.0)
keyring (10.6.0)
keyrings.alt (3.0)
Kivy (1.11.1)
Kivy-Garden (0.1.4)
language-selector (0.1)
MarkupSafe (1.0)
netifaces (0.10.4)
oauthlib (2.0.6)
PAM (0.4.2)
pexpect (4.8.0)
pip (9.0.1)
ptyprocess (0.6.0)
pyasn1 (0.4.2)
pyasn1-modules (0.2.1)
pycrypto (2.6.1)
Pygments (2.6.1)
pygobject (3.26.1)
PyJWT (1.5.3)
pyOpenSSL (17.5.0)
pyserial (3.4)
python-apt (1.6.5+ubuntu0.2)
python-debian (0.1.32)
pyxdg (0.25)
PyYAML (3.12)
requests (2.18.4)
requests-unixsocket (0.1.5)
SecretStorage (2.3.1)
service-identity (16.0.0)
setuptools (39.0.1)
sh (1.12.14)
six (1.14.0)
ssh-import-id (5.7)
systemd-python (234)
Twisted (17.9.0)
ufw (0.36)
unattended-upgrades (0.1)
urllib3 (1.22)
virtualenv (20.0.17)
wheel (0.30.0)
zipp (3.1.0)
zope.interface (4.3.2)
Installed /usr/local/lib/python2.7/dist-packages/buildozer-1.0.1.dev0-py2.7.egg
It looks like you've installed buildozer for python2, whereas you only checked for the zipp module in your python3 environment.
If find the solution,
if i install buildozer with pyhton 3
sudo python3 setup.py install

Python connection with Exasol - export to pandas

I have problem with export data to pandas from Exasol v.6.0.4. I can connect with Exasol but when I want to transport data to pandas DataFrame then I have error. I'm using library pyexasol. My code is following:
from pyexasol import ExaConnection
con = ExaConnection(dsn=dns, user=user, password=password)
con.execute('OPEN SCHEMA SCHEMATEST1') #to this moment everything works correct
data = con.export_to_pandas('select * from TABLETEST1') # pandas data frame per default
Error:
TypeError: cannot serialize '_io.FileIO' object
What I've done bad? How I can export data from Exasol query to Pandas DataFrame?
My libraries and version of tools:
Exasol 6.0.4
Python 3.6.4
Libraries:
backcall (0.1.0)
bleach (2.1.3)
colorama (0.3.9)
decorator (4.3.0)
entrypoints (0.2.3)
html5lib (1.0.1)
ipykernel (4.8.2)
ipython (6.4.0)
ipython-genutils (0.2.0)
ipywidgets (7.2.1)
jedi (0.12.0)
Jinja2 (2.10)
jsonschema (2.6.0)
jupyter (1.0.0)
jupyter-client (5.2.3)
jupyter-console (5.2.0)
jupyter-core (4.4.0)
MarkupSafe (1.0)
mistune (0.8.3)
nbconvert (5.3.1)
nbformat (4.4.0)
notebook (5.5.0)
numpy (1.14.3)
pandas (0.23.0)
pandocfilters (1.4.2)
parso (0.2.1)
pickleshare (0.7.4)
pip (9.0.1)
prompt-toolkit (1.0.15)
pyasn1 (0.4.2)
pyexasol (0.3.17)
Pygments (2.2.0)
pyodbc (4.0.23)
python-dateutil (2.7.3)
pytz (2018.4)
pywinpty (0.5.1)
pyzmq (17.0.0)
qtconsole (4.3.1)
rsa (3.4.2)
scikit-learn (0.19.1)
scipy (1.1.0)
Send2Trash (1.5.0)
setuptools (28.8.0)
simplegeneric (0.8.1)
six (1.11.0)
sklearn (0.0)
terminado (0.8.1)
testpath (0.3.1)
tornado (5.0.2)
traitlets (4.3.2)
wcwidth (0.1.7)
webencodings (0.5.1)
websocket-client (0.47.0)
widgetsnbextension (3.2.1)
Please help! :)
PyEXASOL creator is here! Your code is correct.
This problem was related to Windows "multiprocessing" module implementation lacking fork() and trying to serialize pipe handles created in http_transport.py.
This problem was FIXED starting from version 0.3.23. Please update the package.
pip install --upgrade pyexasol

Cannot Add Database to Superset

I am trying to configure Superset to read data from my Phoenix DB. I have added the SQLAlchemy libs per the instructions but when I attempt to "Add Database" I get the following exception:
The error message returned was:
No module named 'base'
I don't see any messages in the superset.log so I'm at a loss on how to troubleshoot. Here's the list of python modules in the venv
alembic (0.9.6)
amqp (1.4.9)
anyjson (0.3.3)
Babel (2.5.1)
billiard (3.3.0.23)
celery (3.1.23)
cffi (1.11.2)
click (6.7)
colorama (0.3.9)
cryptography (1.5.3)
defusedxml (0.5.0)
Flask (0.12.2)
Flask-AppBuilder (1.8.1)
Flask-Babel (0.11.2)
Flask-Cache (0.13.1)
Flask-Login (0.2.11)
Flask-Migrate (1.5.1)
Flask-OpenID (1.2.5)
Flask-Script (2.0.5)
Flask-SQLAlchemy (2.0)
Flask-Testing (0.5.0)
Flask-WTF (0.14.2)
future (0.16.0)
gunicorn (19.6.0)
humanize (0.5.1)
idna (2.6)
itsdangerous (0.24)
JayDeBeApi (1.1.1)
Jinja2 (2.10)
JPype1 (0.6.2)
kerberos (1.2.5)
kombu (3.0.37)
Mako (1.0.7)
Markdown (2.6.6)
MarkupSafe (1.0)
numpy (1.14.0rc1)
pandas (0.21.1)
parsedatetime (2.0)
phoenixdb (0.7)
pip (9.0.1)
protobuf (3.5.2)
pyasn1 (0.4.2)
pycparser (2.18)
pydruid (0.3.0)
PyGreSQL (5.0.3)
PyHive (0.5.0)
PyMySQL (0.7.9)
python-dateutil (2.5.3)
python-editor (1.0.3)
python3-openid (3.1.0)
pytz (2017.3)
requests (2.10.0)
sasl (0.2.1)
setuptools (38.5.2)
simplejson (3.8.2)
six (1.11.0)
SQLAlchemy (1.2.5)
sqlalchemy-phoenix (0.3.0)
SQLAlchemy-Utils (0.32.7)
sqlparse (0.1.19)
superset (0.15.0)
thrift (0.10.0)
thrift-sasl (0.3.0)
urllib-kerberos (0.2.0)
Werkzeug (0.11.10)
WTForms (2.1)

the confusion of installing locustio

I use pip install locustio and being notified that success, but locust --help get message command not found locust.
and I use pip list and get result as below:
beautifulsoup4 (4.6.0)
click (6.7)
decorator (4.0.11)
Flask (0.12.2)
gevent (1.2.2)
greenlet (0.4.12)
html5lib (0.999999999)
itsdangerous (0.24)
Jinja2 (2.9.6)
locustio (0.8)
MarkupSafe (1.0)
msgpack-python (0.4.8)
oauthlib (2.0.2)
pip (9.0.1)
Pygments (2.2.0)
pyzmq (16.0.2)
requests (2.14.2)
requests-oauthlib (0.8.0)
robotframework (3.0.2)
robotframework-extendedrequestslibrary (0.5.5)
robotframework-requests (0.4.7)
robotframework-ride (1.5.2.1)
robotframework-selenium2library (1.8.0)
selenium (3.4.1)
setuptools (28.8.0)
six (1.10.0)
webencodings (0.5.1)
Werkzeug (0.12.2)
wxPython (2.8.12.1)
wxPython-common (2.8.12.1)
You can see that locustio has been installed. But why I can not use it properly ?
Anyone can give some advice?

Universal way of getting a list of Python modules?

I know that pip install or pip freeze can give out the list of python modules installed. Is there a way by which I could change the way I get the output?
For example: pip freeze gives me:
Landscape-Client==14.12
PAM==0.4.2
Twisted-Core==13.2.0
apt-xapian-index==0.45
argparse==1.2.1
Is there a way that I could change this to display:
Landscape-Client-14.12
PAM-0.4.2
Twisted-Core-13.2.0
apt-xapian-index-0.45
argparse-1.2.1
Also, is there a way to get the list of all python components - both from pip & pip3 or do I have to run the command individually?
The way I am looking at it is to see if we can somehow control the output that pip or pip3 gives us.
pip list outputs like the following
adium-theme-ubuntu (0.3.4)
appdirs (1.4.0)
argh (0.26.2)
args (0.1.0)
Babel (2.3.4)
BeautifulSoup (3.2.1)
cffi (1.9.1)
click (6.7)
clint (0.5.1)
colorama (0.3.7)
compass-stylesheets (1.0.2)
cryptography (1.7.2)
Cython (0.23)
decorator (4.0.11)
Django (1.10.5)
django-request (1.5.1)
djangorestframework (3.5.4)
docutils (0.13.1)
enum34 (1.1.6)
future (0.16.0)
get (0.0.0)
gitdb (0.6.4)
gitdb2 (2.0.0)
GitPython (2.1.1)
gyp (0.1)
httplib2 (0.10.3)
idna (2.2)
image (1.5.5)
influxdb (4.0.0)
ipaddress (1.0.18)
jedi (0.10.0)
Kivy (1.9.1)
Kivy-Garden (0.1.4)
Markdown (2.6.8)
monkeylearn (0.3.6)
networkx (1.11)
numpy (1.12.0)
olefile (0.44)
packaging (16.8)
pandas (0.19.2)
pathlib (1.0.1)
pathtools (0.1.2)
pefile (2016.3.28)
Pillow (4.0.0)
pip (9.0.1)
pkginfo (1.4.1)
post (0.0.0)
public (0.0.0)
pyasn1 (0.2.2)
pycparser (2.17)
pycrypto (2.6.1)
pycryptodome (3.4.5)
pyglet (1.2.4)
Pygments (2.2.0)
pygobject (3.22.0)
pyOpenSSL (16.2.0)
pyparsing (2.1.10)
PyPDF2 (1.26.0)
pyScss (1.3.5)
pystache (0.5.4)
Pyste (0.9.10)
python-dateutil (2.6.0)
pytz (2016.10)
pyxdg (0.25)
PyYAML (3.12)
query-string (0.0.0)
request (0.0.0)
requests (2.13.0)
requests-toolbelt (0.7.1)
rsa (3.4.2)
setupfiles (0.0.0)
setuptools (34.2.0)
simplejson (3.10.0)
six (1.10.0)
smmap (0.9.0)
smmap2 (2.0.1)
swapper (1.0.0)
twine (1.8.1)
ubuntuone-client-data (14.4)
unity-lens-photos (1.0)
urllib3 (1.21.1)
virtualenv (15.1.0)
watchdog (0.8.3)
wheel (0.29.0)
I've never tried to supply additional commands to "list" but as it was pointed out you could write a script.
I'm not quite sure what you mean by "All python components" as that's very broad.
The "pip freeze" commands outputs installed packages in requirements format.
pip list just outputs all locally installed packages along with their version in a somewhat cleaner format. Could you perhaps give me more information as to what you meant by "all python components" in case this answer doesn't help?

Categories