errors trying to installing "wireless" with pip - python

I am trying to install "wireless" with pip. I am not sure why it isn't working. I have tried using sudo's -H flag but nontheless I'm still getting the same errors. I am running Mac OSX Yosemite.
sudo pip install wireless
The directory '/Users/student/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/student/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting wireless
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading wireless-0.3.2.tar.gz
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 324, in run
requirement_set.prepare_files(finder)
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 634, in _prepare_file
abstract_dist.prep_for_dist()
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 129, in prep_for_dist
self.req_to_install.run_egg_info()
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 412, in run_egg_info
self.setup_py, self.name,
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 387, in setup_py
import setuptools # noqa
File "/Library/Python/2.7/site-packages/setuptools/__init__.py", line 12, in <module>
import setuptools.version
File "/Library/Python/2.7/site-packages/setuptools/version.py", line 1, in <module>
import pkg_resources
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
import packaging.requirements
File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)
/Library/Python/2.7/site-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning

Related

Unable to install twisted inside virtualenv on ubuntu 12.04

I am trying to install twisted inside virtualenv, everything seems to go fine but at the end this error is displayed.
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-14YOyA/twisted/
The OS is ubuntu 12.04, does someone have any idea ?
here is the displayed text:
(solidwork)root#rico-TravelMate-5744Z:/home/rico# pip install twisted
Collecting twisted
/home/rico/solidwork/local/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:339: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
SNIMissingWarning
/home/rico/solidwork/local/lib/python2.7/site-packages/pip/_vendor/urllib3/util/ssl_.py:137: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/advanced-usage.html#ssl-warnings
InsecurePlatformWarning
Downloading Twisted-17.9.0.tar.bz2 (3.0MB)
100% |████████████████████████████████| 3.0MB 77kB/s
Complete output from command python setup.py egg_info:
Couldn't find index page for 'incremental' (maybe misspelled?)
No local packages or download links found for incremental>=16.10.1
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-14YOyA/twisted/setup.py", line 21, in <module>
setuptools.setup(**_setup["getSetupArgs"]())
File "/usr/lib/python2.7/distutils/core.py", line 112, in setup
_setup_distribution = dist = klass(attrs)
File "/home/rico/solidwork/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/dist.py", line 221, in __init__
self.fetch_build_eggs(attrs.pop('setup_requires'))
File "/home/rico/solidwork/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/dist.py", line 245, in fetch_build_eggs
parse_requirements(requires), installer=self.fetch_build_egg
File "/home/rico/solidwork/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 576, in resolve
dist = best[req.key] = env.best_match(req, self, installer)
File "/home/rico/solidwork/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 821, in best_match
return self.obtain(req, installer) # try and download/install
File "/home/rico/solidwork/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/pkg_resources.py", line 833, in obtain
return installer(requirement)
File "/home/rico/solidwork/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/dist.py", line 294, in fetch_build_egg
return cmd.easy_install(req)
File "/home/rico/solidwork/local/lib/python2.7/site-packages/distribute-0.6.24-py2.7.egg/setuptools/command/easy_install.py", line 583, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('incremental>=16.10.1')
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-14YOyA/twisted/

Installing twisted on Windows 10 64 bit under python 2.7

Does anyone know how to do this. I have googled and the best that I could come up with was to do:
pip install autobahn[twisted]
when I do that I get this error in the command window
C:\Users\<User Name>\Desktop>pip install autobahn[twisted]
Collecting autobahn[twisted]
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Downloading autobahn-18.3.1-py2.py3-none-any.whl (283kB)
100% |################################| 286kB 1.0MB/s
Collecting txaio>=2.7.0 (from autobahn[twisted])
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
c:\python27\lib\site-packages\pip\_vendor\requests\packages\urllib3\util\ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Exception:
Traceback (most recent call last):
File "c:\python27\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\python27\lib\site-packages\pip\commands\install.py", line 335, in run
wb.build(autobuilding=True)
File "c:\python27\lib\site-packages\pip\wheel.py", line 749, in build
self.requirement_set.prepare_files(self.finder)
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
ignore_dependencies=self.ignore_dependencies))
File "c:\python27\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
session=self.session, hashes=hashes)
File "c:\python27\lib\site-packages\pip\download.py", line 821, in unpack_url
hashes=hashes
File "c:\python27\lib\site-packages\pip\download.py", line 659, in unpack_http_url
hashes)
File "c:\python27\lib\site-packages\pip\download.py", line 853, in _download_http_url
stream=True,
File "c:\python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 488, in get
return self.request('GET', url, **kwargs)
File "c:\python27\lib\site-packages\pip\download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "c:\python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "c:\python27\lib\site-packages\pip\_vendor\requests\sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "c:\python27\lib\site-packages\pip\_vendor\cachecontrol\adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "c:\python27\lib\site-packages\pip\_vendor\requests\adapters.py", line 497, in send
raise SSLError(e, request=request)
SSLError: [Errno 1] _ssl.c:504: error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version
I have no idea how to fix the error
Go to University of California Irvine's Unofficial Windows Binary for Python Extension Packages and download the Twisted wheel file. This is the easy way. The hard way requires a compiler (comes packaged in Windows Built Tools) to be installed.
PLEASE NOTE!!!! For anyone stumbling onto this thread, only the latest package is available for download (usually) through the University of California Irvine site, so it would be wise to SAVE the binaries for future use. This is very useful if a specific version is required. Otherwise the specific compiler needs to used to compile packages.
References
Microsoft Visual C++ Compiler for Python 3.4
https://wiki.python.org/moin/WindowsCompilers

local pypi package depends on python pypi server

I created my local pypi server http://localhost:8080/simple. I uploaded packages flask-mongoengine I need for my project, but when tox try to do pip install that packages dependency for nose, it try to download from pypi.python.org
Collecting flask-mongoengine==0.9.2 (from -r requirements.txt (line 14))
Downloading https://localhost:8080/packages/flask-mongoengine-0.9.2.tar.gz (112kB)
100% |████████████████████████████████| 112kB 26.8MB/s
Complete output from command python setup.py egg_info:
Download error on https://pypi.python.org/simple/nose/: [Errno 101] Network is unreachable -- Some packages may not be found!
Couldn't find index page for 'nose' (maybe misspelled?)
Download error on https://pypi.python.org/simple/: [Errno 101] Network is unreachable -- Some packages may not be found!
No local packages or working download links found for nose
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-n57wg0y0/flask-mongoengine/setup.py", line 74, in <module>
'Topic :: Software Development :: Libraries :: Python Modules'
File "/var/lib/jenkins/.pyenv/versions/3.5.2/lib/python3.5/distutils/core.py", line 108, in setup
_setup_distribution = dist = klass(attrs)
File "/var/lib/jenkins/workspace/myproject/.tox/py35/lib/python3.5/site-packages/setuptools/dist.py", line 315, in __init__
self.fetch_build_eggs(attrs['setup_requires'])
File "/var/lib/jenkins/workspace/myproject/.tox/py35/lib/python3.5/site-packages/setuptools/dist.py", line 361, in fetch_build_eggs
replace_conflicting=True,
File "/var/lib/jenkins/workspace/myproject/.tox/py35/lib/python3.5/site-packages/pkg_resources/__init__.py", line 850, in resolve
dist = best[req.key] = env.best_match(req, ws, installer)
File "/var/lib/jenkins/workspace/myproject/.tox/py35/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1122, in best_match
return self.obtain(req, installer)
File "/var/lib/jenkins/workspace/myproject/.tox/py35/lib/python3.5/site-packages/pkg_resources/__init__.py", line 1134, in obtain
return installer(requirement)
File "/var/lib/jenkins/workspace/myproject/.tox/py35/lib/python3.5/site-packages/setuptools/dist.py", line 429, in fetch_build_egg
return cmd.easy_install(req)
File "/var/lib/jenkins/workspace/myproject/.tox/py35/lib/python3.5/site-packages/setuptools/command/easy_install.py", line 659, in easy_install
raise DistutilsError(msg)
distutils.errors.DistutilsError: Could not find suitable distribution for Requirement.parse('nose')
My pypi server has nose package, but some how, its not redirected to that.
Tried the first answer, it gives error
Traceback (most recent call last):
File "/var/lib/jenkins/workspace/myproject/.tox/py35/lib/python3.5/site-packages/pip/req/req_install.py", line 82, in __init__
req = Requirement(req)
File "/var/lib/jenkins/workspace/myproject/.tox/py35/lib/python3.5/site-packages/pip/_vendor/packaging/requirements.py", line 96, in __init__
requirement_string[e.loc:e.loc + 8]))
pip._vendor.packaging.requirements.InvalidRequirement: Invalid requirement, parse error at "'[global]'"
ERROR: InvocationError: '/var/lib/jenkins/workspace/myproject/.tox/py35/bin/pip install -i http://localhost:8080 --trusted-host localhost:8080 -r requirements.txt'
specify the default to point at localhost? in $HOME/.pypirc :
[distutils]
index-servers =
localpypi
[localpypi]
repository: http://localhost:8080/simple
username:<your_localpypi_username>
password:<your_localpypi_passwd>
A bit further up in requirements.txt something like this might instead work instead of .pypirc, or maybe it might be needed in addtion to:
# requirements.txt
--index-url http://localhost:8080/simple
--trusted-host localhost:8080
flask-mongoengine
And for $HOME/.config/pip/pip.conf :
[global]
timeout = 1
index-url = http://localhost:8080/simple
trusted-host = localhost:8080
ah yeah this too perhaps :
https://pypi.python.org/pypi/pypiserver#uploading-packages-remotely
also maybe :
python setup.py dist upload -r http://localhost:8080/simple
If any dependencies are required from pypi then :
PyPI local cache for Jenkins/local builds
how to create local own pypi repository index without mirror?
I get confused with all the places --index-url and --extra-index-url can get set, but the thought was to set the index-url for pypi, and for pip too?

Error when trying to install paramiko and cryptography in Kivy Buildozer

I am using a Kivy as a Virtual Machine (in MAC OS). I am trying to install the python packages pycrypto and paramiko. Starting with pycrypto, I tried
pip install pycrypto
Requirement already satisfied: pycrypto in /usr/local/lib/python2.7/dist-packages
but when I try to import it in python
>>> import pycrypto
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pycrypto
In paramico, I get the following:
kivy#kivy-VirtualBox:~$ pip install paramiko
Collecting paramiko
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:318: SNIMissingWarning: An HTTPS request has been made, but the SNI (Subject Name Indication) extension to TLS is not available on this platform. This may cause the server to present an incorrect TLS certificate, which can cause validation failures. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#snimissingwarning.
SNIMissingWarning
/usr/local/lib/python2.7/dist-packages/pip/_vendor/requests/packages/urllib3/util/ssl_.py:122: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. You can upgrade to a newer version of Python to solve this. For more information, see https://urllib3.readthedocs.io/en/latest/security.html#insecureplatformwarning.
InsecurePlatformWarning
Using cached paramiko-2.1.2-py2.py3-none-any.whl
Requirement already satisfied: pyasn1>=0.1.7 in /usr/local/lib/python2.7/dist-packages (from paramiko)
Collecting cryptography>=1.1 (from paramiko)
Using cached cryptography-1.7.2.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-build-ZboIFP/cryptography/setup.py", line 334, in <module>
**keywords_with_side_effects(sys.argv)
File "/usr/lib/python2.7/distutils/core.py", line 111, in setup
_setup_distribution = dist = klass(attrs)
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 320, in __init__
_Distribution.__init__(self, attrs)
File "/usr/lib/python2.7/distutils/dist.py", line 287, in __init__
self.finalize_options()
File "/usr/local/lib/python2.7/dist-packages/setuptools/dist.py", line 386, in finalize_options
ep.require(installer=self.fetch_build_egg)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 2324, in require
items = working_set.resolve(reqs, env, installer, extras=self.extras)
File "/usr/local/lib/python2.7/dist-packages/pkg_resources/__init__.py", line 859, in resolve
raise VersionConflict(dist, req).with_context(dependent_req)
pkg_resources.VersionConflict: (six 1.5.2 (/usr/lib/python2.7/dist-packages), Requirement.parse('six>=1.6.0'))
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-ZboIFP/cryptography/
Any suggestions?
From the command line try:
python 2.7 import pycrypto

Installing Python package pathos from git

I am trying to install pathos library from git, but getting the following error:
>pip install https://github.com/uqfoundation/pathos
Exception:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundl
e=self.bundle)
File "C:\Python27\lib\site-packages\pip\req.py", line 1197, in prepare_files
do_download,
File "C:\Python27\lib\site-packages\pip\req.py", line 1375, in unpack_url
self.session,
File "C:\Python27\lib\site-packages\pip\download.py", line 582, in unpack_http
_url
unpack_file(temp_location, location, content_type, link)
File "C:\Python27\lib\site-packages\pip\util.py", line 627, in unpack_file
and is_svn_page(file_contents(filename))):
File "C:\Python27\lib\site-packages\pip\util.py", line 210, in file_contents
return fp.read().decode('utf-8')
File "C:\Python27\lib\encodings\utf_8.py", line 16, in decode
return codecs.utf_8_decode(input, errors, True)
UnicodeDecodeError: 'utf8' codec can't decode byte 0x8b in position 1: invalid start byte
What is the problem here and how can I get around it?
Thanks
EDIT 1:
Tried the following:
pip install git+https://github.com/uqfoundation/pathos
...but still no luck:
>pip install git+https://github.com/uqfoundation/pathos
Downloading/unpacking git+https://github.com/uqfoundation/pathos
Cloning https://github.com/uqfoundation/pathos to c:\users\gronin\appdata\local\temp\pip-qstvgd-build
Cleaning up...
Cannot find command 'git'
EDIT 2:
Tried the following, recommended by cel:
pip install git+https://github.com/uqfoundation/pathos
...that definitely solved lookup problems (thanks, cel), still having installation issues:
Downloading/unpacking git+https://github.com/uqfoundation/pathos
Cloning https://github.com/uqfoundation/pathos to c:\users\gronin\appdata\loca
l\temp\pip-jldriz-build
Running setup.py (path:c:\users\gronin\appdata\local\temp\pip-jldriz-build\set
up.py) egg_info for package from git+https://github.com/uqfoundation/pathos
Downloading/unpacking pp>=1.6.4.4 (from pathos==0.2a1.dev)
Could not find any downloads that satisfy the requirement pp>=1.6.4.4 (from pathos==0.2a1.dev)
I have a long overdue pathos release that I need to push out (this month). I'll see what I can do to make it pip installable. There are two main issues: (1) the released versions of the packages are named in a non-standard way (e.g. 0.2.a1-dev), and (2) several dependencies are forked from other packages, and are only available on http://dev.danse.us/packages. The temporary workaround for (1) is either to install with the --pre flag for pip as well as using git+https, or to install them manually (easy_install actually works). The workaround for (2) is also as #cel has suggested… download the dependencies and install manually (or use easy_install).
This will be sorted out in the stable release. It's basically the blocker issue for getting the release out -- primarily due to (2) above.
Keep track of the status of this issue here: https://github.com/uqfoundation/pathos/issues/2

Categories