How to interpret this traceback? - python

I'm setting up a new development machine and installed my IDE pycharm. I installed python to C:\Program (x86)\python27. But when I start my gae server I get this traceback. What does it mean?
pydev debugger: process 7576 is connecting
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.3\helpers\pydev\pydevd.py", line 2358, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.3\helpers\pydev\pydevd.py", line 1778, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files (x86)\Google\google_appengine\_python_runtime.py", line 83, in <module>
_run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\_python_runtime.py", line 79, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\runtime.py", line 175, in <module>
main()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\runtime.py", line 155, in main
sandbox.enable_sandbox(config)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 189, in enable_sandbox
from google.appengine.runtime import runtime
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\runtime.py", line 40, in <module>
from google.appengine.runtime import cgi
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\cgi.py", line 32, in <module>
from email import feedparser
File "C:\Program Files (x86)\python27\lib\email\feedparser.py", line 27, in <module>
from email import message
File "C:\Program Files (x86)\python27\lib\email\message.py", line 16, in <module>
import email.charset
File "C:\Program Files (x86)\python27\lib\email\charset.py", line 13, in <module>
import email.base64mime
File "C:\Program Files (x86)\python27\lib\email\base64mime.py", line 40, in <module>
from email.utils import fix_eols
File "C:\Program Files (x86)\python27\lib\email\utils.py", line 28, in <module>
import socket
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 829, in load_module
return self.import_stub_module(fullname)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 841, in import_stub_module
__import__(fullname, {}, {})
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\dist27\socket.py", line 73, in <module>
from _ssl import RAND_add, RAND_egd, RAND_status, SSL_ERROR_ZERO_RETURN, SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE, SSL_ERROR_WANT_X509_LOOKUP, SSL_ERROR_SYSCALL, SSL_ERROR_SSL, SSL_ERROR_WANT_CONNECT, SSL_ERROR_EOF, SSL_ERROR_INVALID_ERROR_CODE
ImportError: cannot import name RAND_egd
pydev debugger: process 2496 is connecting
Traceback (most recent call last):
File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.3\helpers\pydev\pydevd.py", line 2358, in <module>
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files (x86)\JetBrains\PyCharm 4.5.3\helpers\pydev\pydevd.py", line 1778, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files (x86)\Google\google_appengine\_python_runtime.py", line 83, in <module>
_run_file(__file__, globals())
File "C:\Program Files (x86)\Google\google_appengine\_python_runtime.py", line 79, in _run_file
execfile(_PATHS.script_file(script_name), globals_)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\runtime.py", line 175, in <module>
main()
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\runtime.py", line 155, in main
sandbox.enable_sandbox(config)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 189, in enable_sandbox
from google.appengine.runtime import runtime
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\runtime.py", line 40, in <module>
from google.appengine.runtime import cgi
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\runtime\cgi.py", line 32, in <module>
from email import feedparser
File "C:\Program Files (x86)\python27\lib\email\feedparser.py", line 27, in <module>
from email import message
File "C:\Program Files (x86)\python27\lib\email\message.py", line 16, in <module>
import email.charset
File "C:\Program Files (x86)\python27\lib\email\charset.py", line 13, in <module>
import email.base64mime
File "C:\Program Files (x86)\python27\lib\email\base64mime.py", line 40, in <module>
from email.utils import fix_eols
File "C:\Program Files (x86)\python27\lib\email\utils.py", line 28, in <module>
import socket
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 829, in load_module
return self.import_stub_module(fullname)
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\python\sandbox.py", line 841, in import_stub_module
__import__(fullname, {}, {})
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\dist27\socket.py", line 73, in <module>
from _ssl import RAND_add, RAND_egd, RAND_status, SSL_ERROR_ZERO_RETURN, SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE, SSL_ERROR_WANT_X509_LOOKUP, SSL_ERROR_SYSCALL, SSL_ERROR_SSL, SSL_ERROR_WANT_CONNECT, SSL_ERROR_EOF, SSL_ERROR_INVALID_ERROR_CODE
ImportError: cannot import name RAND_egd
If I run as admin pip install PyOpenSLL then I get
C:\>pip install pyopensll
Collecting pyopensll
Could not find a version that satisfies the requirement pyopensll (from versio
ns: )
No matching distribution found for pyopensll
C:\>pip install pyOpenSSL
Requirement already satisfied (use --upgrade to upgrade): pyOpenSSL in c:\progra
m files (x86)\python27\lib\site-packages
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in c:\progr
am files (x86)\python27\lib\site-packages (from pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): cryptography>=0.7 in c
:\program files (x86)\python27\lib\site-packages (from pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): setuptools in c:\progr
am files (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): enum34 in c:\program f
iles (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): pyasn1 in c:\program f
iles (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): idna in c:\program fil
es (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): ipaddress in c:\progra
m files (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): cffi>=0.8 in c:\progra
m files (x86)\python27\lib\site-packages (from cryptography>=0.7->pyOpenSSL)
Requirement already satisfied (use --upgrade to upgrade): pycparser in c:\progra
m files (x86)\python27\lib\site-packages (from cffi>=0.8->cryptography>=0.7->pyO
penSSL)
C:\>

New:
It seems that you use LibreSSl instead of OpenSSL. See Python: Issue 21356
Check if you're using LibreSSL by running this in python-shell:
from ssl import OPENSSL_VERSION; print OPENSSL_VERSION
Old:
File "C:\Program Files (x86)\Google\google_appengine\google\appengine\dist27\socket.py", line 73, in <module>
from _ssl import RAND_add, RAND_egd, RAND_status, SSL_ERROR_ZERO_RETURN, SSL_ERROR_WANT_READ, SSL_ERROR_WANT_WRITE, SSL_ERROR_WANT_X509_LOOKUP, SSL_ERROR_SYSCALL, SSL_ERROR_SSL, SSL_ERROR_WANT_CONNECT, SSL_ERROR_EOF, SSL_ERROR_INVALID_ERROR_CODE
ImportError: cannot import name RAND_egd
is the essential for you to know. In pretty easy writing, it means:
"Google's app engine is unable to find a Name called RAND_egd in module _ssl"
Try to update all packages.
Try from _ssl Import RAND_egd from console, then put results here.

At the moment, the public Issue list doesn't have any bugs mentioning RAND_egd. I recommend filing a bug against this problem, including the stack trace and mentioning that you're seeing this on Windows 8.1. Include a link to to this stackoverflow question.
That still leaves you with an immediate problem, so consider trying this experiment: Edit google_appengine\google\appengine\dist27\socket.py and remove the reference to RAND_egd (leaving a copy of the original line commented out, or make a copy of socket.py, so that you can revert the change easily). Then see what happens. You might get lucky. And please report back.

Related

how to set the environment variable `JUPYTER_PLATFORM_DIRS=1`?

I am running a .py file in google colab. Sometimes I can run it successfully but sometimes I get the error below. Can anyone help me fix this issue?
Traceback (most recent call last):
File "sculpt_faces.py", line 25, in <module>
from matplotlib.pyplot import cm
File "/usr/local/lib/python3.8/dist-packages/matplotlib/pyplot.py", line 2282, in <module>
switch_backend(rcParams["backend"])
File "/usr/local/lib/python3.8/dist-packages/matplotlib/pyplot.py", line 221, in switch_backend
backend_mod = importlib.import_module(backend_name)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "/usr/local/lib/python3.8/dist-packages/ipykernel/__init__.py", line 2, in <module>
from .connect import *
File "/usr/local/lib/python3.8/dist-packages/ipykernel/connect.py", line 18, in <module>
import jupyter_client
File "/usr/local/lib/python3.8/dist-packages/jupyter_client/__init__.py", line 4, in <module>
from .connect import *
File "/usr/local/lib/python3.8/dist-packages/jupyter_client/connect.py", line 28, in <module>
from jupyter_core.paths import jupyter_data_dir, jupyter_runtime_dir, secure_write
File "/usr/local/lib/python3.8/dist-packages/jupyter_core/paths.py", line 176, in <module>
deprecation(
File "/usr/local/lib/python3.8/dist-packages/jupyter_core/utils/__init__.py", line 87, in deprecation
warnings.warn(message, DeprecationWarning, stacklevel=stacklevel + 1)
DeprecationWarning: Jupyter is migrating its paths to use standard platformdirs
given by the platformdirs library. To remove this warning and
see the appropriate new directories, set the environment variable
`JUPYTER_PLATFORM_DIRS=1` and then run `jupyter --paths`.
The use of platformdirs will be the default in `jupyter_core` v6
This is the result of running "!pip install jupyter-core":
Looking in indexes: https://pypi.org/simple, https://us-python.pkg.dev/colab-wheels/public/simple/
Requirement already satisfied: jupyter-core in /usr/local/lib/python3.8/dist-packages (5.1.0)
Requirement already satisfied: traitlets>=5.3 in /usr/local/lib/python3.8/dist-packages (from jupyter-core) (5.6.0)
Requirement already satisfied: platformdirs>=2.5 in /usr/local/lib/python3.8/dist-packages (from jupyter-core) (2.5.4)
This warning tells you to set the environment variable.
On Linux this can be done running
export JUPYTER_PLATFORM_DIRS=1
to set a environment variable in a terminal.
Then run
jupyter --paths
in the terminal, too. Afterwards if you run your tests/code this warning should not appear.

ImportError: cannot import name '_message' from 'google.protobuf.pyext' (c:\programdata\anaconda3\lib\site-packages\google\protobuf\pyext\__init__.py)

I am trying this command(That I don't know what it does! I only following a tutorial):
tensorboard --logdir=/tmp/tensorflow/rnn_words
And get this result:
Traceback (most recent call last):
File "c:\programdata\anaconda3\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "c:\programdata\anaconda3\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\ProgramData\Anaconda3\Scripts\tensorboard.exe\__main__.py", line 5, in <module>
File "c:\programdata\anaconda3\lib\site-packages\tensorboard\main.py", line 45, in <module>
from tensorboard import default
File "c:\programdata\anaconda3\lib\site-packages\tensorboard\default.py", line 34, in <module>
import tensorflow as tf
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\__init__.py", line 24, in <module>
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\python\__init__.py", line 52, in <module>
from tensorflow.core.framework.graph_pb2 import *
File "c:\programdata\anaconda3\lib\site-packages\tensorflow\core\framework\graph_pb2.py", line 6, in <module>
from google.protobuf import descriptor as _descriptor
File "c:\programdata\anaconda3\lib\site-packages\google\protobuf\descriptor.py", line 47, in <module>
from google.protobuf.pyext import _message
ImportError: cannot import name '_message' from 'google.protobuf.pyext' (c:\programdata\anaconda3\lib\site-packages\google\protobuf\pyext\__init__.py)
What does the above command do? Why do I get this error message?
C:\Windows\system32>python --version
Python 3.7.1
C:\Windows\system32>pip install protobuf
Requirement already satisfied: protobuf in c:\programdata\anaconda3\lib\site-packages (3.6.1)
Requirement already satisfied: six>=1.9 in c:\programdata\anaconda3\lib\site-packages (from protobuf) (1.12.0)
Requirement already satisfied: setuptools in c:\programdata\anaconda3\lib\site-packages (from protobuf) (40.6.3)
if you are in mac, please try it
pip install --upgrade --force-reinstall protobuf
Works with pip install protobuf==3.14.0 with Python 3.9
You can test with the following:
# python
Python 3.9.13 (main, Aug 2 2022, 11:20:39)
>>> from google.protobuf.pyext.cpp_message import GeneratedProtocolMessageType

Pylint installation failed on windows

I tried to install pylint on windows (using visual studio code). I have this exception, I can't find a solution.
I already tried to completely reinstall python but I have the exact same error.
On other PC, the same repro step works fine.
>"C:\Program Files (x86)\Python36-32\python" -m pip install pylint
Collecting pylint
Downloading pylint-1.7.2-py2.py3-none-any.whl (644kB)
100% |████████████████████████████████| 645kB 1.9MB/s
Collecting colorama; sys_platform == "win32" (from pylint)
Downloading colorama-0.3.9-py2.py3-none-any.whl
Collecting astroid>=1.5.1 (from pylint)
Downloading astroid-1.5.3-py2.py3-none-any.whl (269kB)
100% |████████████████████████████████| 276kB 4.1MB/s
Collecting isort>=4.2.5 (from pylint)
Downloading isort-4.2.15-py2.py3-none-any.whl (43kB)
100% |████████████████████████████████| 51kB 5.7MB/s
Collecting mccabe (from pylint)
Downloading mccabe-0.6.1-py2.py3-none-any.whl
Collecting six (from pylint)
Downloading six-1.10.0-py2.py3-none-any.whl
Collecting lazy-object-proxy (from astroid>=1.5.1->pylint)
Downloading lazy_object_proxy-1.3.1-cp36-cp36m-win32.whl
Collecting wrapt (from astroid>=1.5.1->pylint)
Downloading wrapt-1.10.11.tar.gz
Installing collected packages: colorama, six, lazy-object-proxy, wrapt, astroid, isort, mccabe, pylint
Running setup.py install for wrapt ... error
Exception:
Traceback (most recent call last):
File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\compat\__init__.py", line 73, in console_to_str
return s.decode(sys.__stdout__.encoding)
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 5: invalid continuation byte
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\req\req_install.py", line 878, in install
spinner=spinner,
File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\utils\__init__.py", line 676, in call_subprocess
line = console_to_str(proc.stdout.readline())
File "C:\Program Files (x86)\Python36-32\lib\site-packages\pip\compat\__init__.py", line 75, in console_to_str
return s.decode('utf_8')
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xe9 in position 5: invalid continuation byte
Do you have any what the problem could be?
EDIT:
As Shankar said, I installed astroid manually. It didn't work the first time. I encountered this issue: python easy_install pylint Error: The system cannot find the file specified
The installation finally worked but nothing changed for pylint.
Here is the log I receive when I try to run pylint
Traceback (most recent call last):
File "c:\program files (x86)\python36-32\lib\runpy.py", line 193, in _run_modu
le_as_main
"__main__", mod_spec)
File "c:\program files (x86)\python36-32\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Program Files (x86)\Python36-32\Scripts\pylint.exe\__main__.py", line
9, in <module>
File "c:\program files (x86)\python36-32\lib\site-packages\pylint\__init__.py"
, line 12, in run_pylint
from pylint.lint import Run
File "c:\program files (x86)\python36-32\lib\site-packages\pylint\lint.py", li
ne 43, in <module>
import astroid
File "c:\program files (x86)\python36-32\lib\site-packages\astroid\__init__.py
", line 57, in <module>
from astroid.nodes import *
File "c:\program files (x86)\python36-32\lib\site-packages\astroid\nodes.py",
line 30, in <module>
from astroid.node_classes import (
File "c:\program files (x86)\python36-32\lib\site-packages\astroid\node_classe
s.py", line 26, in <module>
from astroid import decorators
File "c:\program files (x86)\python36-32\lib\site-packages\astroid\decorators.
py", line 12, in <module>
import wrapt
File "c:\program files (x86)\python36-32\lib\site-packages\wrapt\__init__.py",
line 4, in <module>
from .wrappers import (ObjectProxy, CallableObjectProxy, FunctionWrapper,
ModuleNotFoundError: No module named 'wrapt.wrappers'
Thanks
Install
Pylint requires astroid package (the later the better).
https://github.com/PyCQA/astroid
Installation should be as simple as
python -m pip install astroid
Pylint requires isort package (the later the better).
https://github.com/timothycrosley/isort
Installation should be as simple as
python -m pip install isort
If you want to install from a source distribution, extract the tarball and run the following commands
python setup.py install
You’ll have to install dependencies in a similar way. For debian and rpm packages, use your usual tools according to your Linux distribution.
More information about installation and available distribution format may be found in the user manual in the doc subdirectory.
After these two dependencies installed , try installing pylint again.

"ImportError: No module named eventlog" with eventlog installed

I am trying out pinax. It will not run:
cchilders:~/projects/pinax$ ./manage.py migrate
Traceback (most recent call last):
File "./manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/apps/config.py", line 119, in create
import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named eventlog
Then it says it's already installed
cchilders:~/projects/pinax$ pip install pinax-eventlog
Requirement already satisfied (use --upgrade to upgrade): pinax-eventlog in /home/cchilders/.virtualenvs/pinax/lib/python2.7/site-packages
Requirement already satisfied (use --upgrade to upgrade): jsonfield>=1.0.3 in /home/cchilders/.virtualenvs/pinax/lib/python2.7/site-packages (from pinax-eventlog)
Requirement already satisfied (use --upgrade to upgrade): Django>=1.4.3 in /home/cchilders/.virtualenvs/pinax/lib/python2.7/site-packages (from jsonfield>=1.0.3->pinax-eventlog)
You are using pip version 8.0.0, however version 8.0.2 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
settings.py:
INSTALLED_APPS = [
...
"bootstrapform",
"pinax_theme_bootstrap",
# external
"account",
"metron",
"pinax.eventlog",
# "eventlog",
# project
"pinax",
]
???
Traceback (most recent call last):
File "manage.py", line 12, in <module>
execute_from_command_line(sys.argv)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line
utility.execute()
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute
django.setup()
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/home/cchilders/.virtualenvs/pinax/local/lib/python2.7/site-packages/django/apps/config.py", line 119, in create
import_module(entry)
File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module
__import__(name)
ImportError: No module named eventlog
requirements
Django==1.9.2
pinax-theme-bootstrap==7.2.0
django-user-accounts==1.3.1
metron==1.3.7
pinax-eventlog==1.1.1
Even though it says it's installed, doesn't seem to be there:
cchilders:~/.virtualenvs/pinax/lib/python2.7/site-packages$ ls
account django_user_accounts-1.3.1.dist-info metron-1.3.7.dist-info pkg_resources six.pyc
appconf easy_install.py pinax pytz wheel
bootstrapform easy_install.pyc pinax_eventlog-1.1.1.dist-info pytz-2015.7.dist-info wheel-0.26.0.dist-info
django jsonfield pinax_theme_bootstrap setuptools
Django-1.9.2.dist-info jsonfield-1.0.3.dist-info pinax_theme_bootstrap-7.2.0.dist-info setuptools-19.4.dist-info
django_appconf-1.0.1.dist-info _markerlib pip six-1.10.0.dist-info
django_bootstrap_form-3.2.dist-info metron pip-8.0.0.dist-info six.py
Why doesn't the default pinax app work? Thank you

Install Scrapy error on Mac OS 10.9.4

I am using mac ox 10.9.4, with python 2.7.6. I am trying to install the Scrapy by
pip install Scrapy
After some downloadsthe following happens:
Running setup.py (path:/private/var/folders/6w/2xcgzk1512l1bnhsylw571y40000gn/T/pip_build_nereus/pyOpenSSL/setup.py) egg_info for package pyOpenSSL
warning: no previously-included files matching '*.pyc' found anywhere in distribution
no previously-included directories found matching 'doc/_build'
Requirement already satisfied (use --upgrade to upgrade): six>=1.5.2 in ./anaconda/lib/python2.7/site-packages (from Scrapy)
Downloading/unpacking queuelib (from Scrapy)
Downloading queuelib-1.2.2-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): lxml in ./anaconda/lib/python2.7/site-packages (from Scrapy)
Downloading/unpacking w3lib>=1.8.0 (from Scrapy)
Downloading w3lib-1.10.0-py2.py3-none-any.whl
Downloading/unpacking cssselect>=0.9 (from Scrapy)
Downloading cssselect-0.9.1.tar.gz
Running setup.py (path:/private/var/folders/6w/2xcgzk1512l1bnhsylw571y40000gn/T/pip_build_nereus/cssselect/setup.py) egg_info for package cssselect
no previously-included directories found matching 'docs/_build'
Downloading/unpacking Twisted>=10.0.0 (from Scrapy)
Downloading Twisted-14.0.2.tar.bz2 (4.3MB): 4.3MB downloaded
Running setup.py (path:/private/var/folders/6w/2xcgzk1512l1bnhsylw571y40000gn/T/pip_build_nereus/Twisted/setup.py) egg_info for package Twisted
Downloading/unpacking cryptography>=0.2.1 (from pyOpenSSL->Scrapy)
Downloading cryptography-0.5.4.tar.gz (320kB): 320kB downloaded
Running setup.py (path:/private/var/folders/6w/2xcgzk1512l1bnhsylw571y40000gn/T/pip_build_nereus/cryptography/setup.py) egg_info for package cryptography
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/private/var/folders/6w/2xcgzk1512l1bnhsylw571y40000gn/T/pip_build_nereus/cryptography/setup.py", line 174, in <module>
"test": PyTest,
File "/Users/nereus/anaconda/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/dist.py", line 239, in __init__
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/dist.py", line 264, in fetch_build_eggs
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 580, in resolve
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 818, in best_match
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 830, in obtain
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/dist.py", line 314, in fetch_build_egg
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/easy_install.py", line 593, in easy_install
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/easy_install.py", line 623, in install_item
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/easy_install.py", line 809, in install_eggs
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/easy_install.py", line 1015, in build_and_install
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/easy_install.py", line 1000, in run_setup
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/sandbox.py", line 50, in run_setup
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/sandbox.py", line 100, in run
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/sandbox.py", line 52, in <lambda>
File "setup.py", line 86, in <module>
File "setup.py", line 49, in ask_supports_thread
"iso8601",
File "/Users/nereus/anaconda/lib/python2.7/distutils/command/config.py", line 230, in try_compile
self._check_compiler()
File "/Users/nereus/anaconda/lib/python2.7/distutils/command/config.py", line 103, in _check_compiler
customize_compiler(self.compiler)
File "/Users/nereus/anaconda/lib/python2.7/distutils/sysconfig.py", line 170, in customize_compiler
_osx_support.customize_compiler(_config_vars)
File "/Users/nereus/anaconda/lib/python2.7/_osx_support.py", line 418, in customize_compiler
_find_appropriate_compiler(_config_vars)
File "/Users/nereus/anaconda/lib/python2.7/_osx_support.py", line 185, in _find_appropriate_compiler
if 'llvm-gcc' in data:
TypeError: argument of type 'NoneType' is not iterable
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/private/var/folders/6w/2xcgzk1512l1bnhsylw571y40000gn/T/pip_build_nereus/cryptography/setup.py", line 174, in <module>
"test": PyTest,
File "/Users/nereus/anaconda/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/dist.py", line 239, in __init__
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/dist.py", line 264, in fetch_build_eggs
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 580, in resolve
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 818, in best_match
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/pkg_resources.py", line 830, in obtain
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/dist.py", line 314, in fetch_build_egg
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/easy_install.py", line 593, in easy_install
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/easy_install.py", line 623, in install_item
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/easy_install.py", line 809, in install_eggs
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/easy_install.py", line 1015, in build_and_install
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/command/easy_install.py", line 1000, in run_setup
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/sandbox.py", line 50, in run_setup
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/sandbox.py", line 100, in run
File "/Users/nereus/anaconda/lib/python2.7/site-packages/setuptools-2.2-py2.7.egg/setuptools/sandbox.py", line 52, in <lambda>
File "setup.py", line 86, in <module>
File "setup.py", line 49, in ask_supports_thread
"iso8601",
File "/Users/nereus/anaconda/lib/python2.7/distutils/command/config.py", line 230, in try_compile
self._check_compiler()
File "/Users/nereus/anaconda/lib/python2.7/distutils/command/config.py", line 103, in _check_compiler
customize_compiler(self.compiler)
File "/Users/nereus/anaconda/lib/python2.7/distutils/sysconfig.py", line 170, in customize_compiler
_osx_support.customize_compiler(_config_vars)
File "/Users/nereus/anaconda/lib/python2.7/_osx_support.py", line 418, in customize_compiler
_find_appropriate_compiler(_config_vars)
File "/Users/nereus/anaconda/lib/python2.7/_osx_support.py", line 185, in _find_appropriate_compiler
if 'llvm-gcc' in data:
TypeError: argument of type 'NoneType' is not iterable
----------------------------------------
Cleaning up...
Command python setup.py egg_info failed with error code 1 in /private/var/folders/6w/2xcgzk1512l1bnhsylw571y40000gn/T/pip_build_nereus/cryptography
Storing debug log for failure in /Users/nereus/.pip/pip.log
Could anyone please help me to figure it out?
Thank you so mcuh.
Have you installed the xcode command line tools? Try running this command:
xcode-select --install
I found it easier to use anaconda. install that first. then you can do
conda install scrapy
anaconda is a full featured python distro that is self contained.

Categories