I am following the instructions on - http://pytest.org/latest/getting-started.html#installation-issues.
I have tried many options and also searched on the web. But I still get the following errors.
Installed c:\python26\lib\site-packages\pytest-2.2.3-py2.6.egg
Processing dependencies for pytest==2.2.3
Searching for py>=1.4.7.dev2
Reading http://pypi.python.org/simple/py/
Download error: [Errno 11001] getaddrinfo failed -- Some packages may not be found!
Couldn't find index page for 'py' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Download error: [Errno 11001] getaddrinfo failed -- Some packages may not be found!
No local packages or download links found for py>=1.4.7.dev2
Best match: None
I have Windows XP and python 2.6. I want to install py.test on this settings. Is there a way for this to work?
from you instruction:
Windows: If “easy_install” or “py.test” are not found you need to add the Python script path to your PATH, see here: Python for Windows. You may alternatively use an ActivePython install which does this for you automatically.
How to set PATH variable
Related
I keep failing to run pip install on the tensorflow package. First it downloads the .whl file, then goes through a bunch of already satisfied requirements until it gets to installing collected packages: tensorflow, at which point here's the error I get:
ERROR: Could not install packages due to an EnvironmentError: [Errno 2] No such file or directory: 'C:\\Users\\Borik\\AppData\\Local\\Packages\\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\\LocalCache\\local-packages\\Python38\\site-packages\\tensorflow\\include\\external\\com_github_grpc_grpc\\src\\core\\ext\\filters\\client_channel\\lb_policy\\grpclb\\client_load_reporting_filter.h'
I've never seen anything like this before and can't seem to find anything on the net. I'm using Windows 10 and the latest versions of Python and pip.
I hit the same issue on Win10. Rather than renaming my filesystem, I found a good solution in this Python documentation. To summarize the instructions there to change MAX_PATH, either:
Enable the "Enable Win32 long paths" group policy:
Run gpedit (or searching for "Edit Group Policy" in the Control Panel)
Find the "Enable Win32 long paths" option in the sidebar. It should be under Local Computer Policy -> Computer Configuration -> Administrative Templates -> System -> Filesystem (under both Windows 10 and Windows 11, currently).
Or edit the registry setting HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\FileSystem and set LongPathsEnabled to 1.
This extends path from char(256) to char(32000). After this change, my 'pip install tensorflow' succeeded.
I got the same problem in Windows 10.
I have downloaded Python 3.10 and installed it with PATH.
I found that there is a duplicate installation for Python 3.10 (the same from the Windows Store app. My solution was to uninstall the application of Python from the Windows Store.
You don't have this folder in your PC:
C:\Users\<yourName>\AppData\Local\packages\pythonsoftwarefoundation.python.3.10_qbz5n2kfra8p0
On my laptop Windows 10 machine I was able to download the package "xfoil 1.1.1": https://pypi.org/project/xfoil/ in Jupyter Notebook by executing the command "!pip install xfoil". I tried doing the exact same thing on my new desktop and get the error "ERROR: Failed building wheel for xfoil" as well as the warning "UserWarning: Unknown distribution option: 'zip_save'". This is the same error described here: https://www.pythonanywhere.com/forums/topic/27038/ even though I have no issues installing other packages. The conclusion from that thread seemed to be that the package must have an error associated with it, but I am not sure why it would work on one machine but not the other since I am using Anaconda 3.8 for both.
It's a bug in the package: zip_save is misspelled, it must be spelled zip_safe. You cannot do much with it until the author(s) fix the bug.
You can fork the repository, fix the misspelling and install the package from your own repository.
Download the files from here.
On your command line type: python setup.py install
If you get this error:
ValueError: Unknown MS Compiler version 1927
go to
C:\Python39\Lib\distutils
and locate the file: cygwinccompiler.py
In the function
def get_msvcr():
add one more "elif" statement like this one:
elif msc_ver == '1927':
return ["mspdb140.dll"]
I get error during splunk's python module installation.
-ltm:splunk-sdk-python root# easy_install splunklib.binding
Searching for splunklib.binding
Reading https://pypi.python.org/simple/splunklib.binding/
Couldn't find index page for 'splunklib.binding' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for splunklib.binding
error: Could not find suitable distribution for Requirement.parse('splunklib.binding')
-ltm:splunk-sdk-python root# pwd
/var/root/splunk-sdk-python
can somebody please help to get this module installed.
I'm trying to download some packages (currently, the google API) via pip - but I'm getting this response:
pi#raspberrypi ~ $ sudo easy_install google-api-python-client
Searching for google-api-python-client
Best match: google-api-python-client 1.3.1
Processing google_api_python_client-1.3.1-py2.7.egg
google-api-python-client 1.3.1 is already the active version in easy-install.pth
Using /usr/local/lib/python2.7/dist-packages/google_api_python_client-1.3.1-py2.7.egg
Processing dependencies for google-api-python-client
Searching for uritemplate>=0.6
Reading http://pypi.python.org/simple/uritemplate/
Download error on http://pypi.python.org/simple/uritemplate/: [Errno -5] No address associated with hostname -- Some packages may not be found!
Reading http://pypi.python.org/simple/uritemplate/
Download error on http://pypi.python.org/simple/uritemplate/: [Errno -5] No address associated with hostname -- Some packages may not be found!
Couldn't find index page for 'uritemplate' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading http://pypi.python.org/simple/
Download error on http://pypi.python.org/simple/: [Errno -5] No address associated with hostname -- Some packages may not be found!
No local packages or download links found for uritemplate>=0.6
error: Could not find suitable distribution for Requirement.parse('uritemplate>=0.6')
Now, I figured I'd ask here instead of on RPi.SE since this seems to have been asked and answered here several times already. Now, normally, that would constitute not asking again - but none of these solutions have helped.
I've looked at
python pip installation error 'cannot fetch base index URL'
DNS lookup failed: address 'your.proxy.com' not found: [Errno -5] No address associated with hostname
pip can not install anything
Error while installing with Python “pip”: Cannot fetch index base URL http//:
just to name a few.
Several of these solutions mention a proxy issue causing this error - however, that isn't my problem, as I don't have a proxy and my $http_proxy is null:
pi#raspberrypi ~ $ echo $http_proxy
pi#raspberrypi ~ $
Another issue that was mentioned was the lack of the proper SSL version and the solution given was to install pip 1.2.1...now that seems a bit outdated. Do I need to install a certain version of OpenSSL/pip?
I did install pip 1.2.1, I had 1.1.1 previously (the package from the Raspbian repositories) but got the same error.
Any idea what might be causing this?
EDIT: Is it an HTTPLib error?
I believe that this is an issue with the Python installation on my Raspberry Pi, because I'm getting the same error ([Errno -5] No address associated with hostname) in some other code of mine using the httplib python library. An issue in the httplib library would definitely explain this issue.
Note, curl, wget, and lynx all work just fine.
I solved the issue with a work-around, as per this post on the Raspberry Pi Forums.
I had to edit the create_connection() function in the /usr/lib/python2.7/socket.py file to resolve the hostname to an IP first:
Original Code:
def create_connection(.....)
host, port = address
err = None
for res in getaddrinfo(host, port, 0, SOCK_STREAM):
Edited Code:
def create_connection(.....)
host, port = address
err = None
hostip = gethostbyname(host)
for res in getaddrinfo(hostip, port, 0, SOCK_STREAM):
Whether I use PIP or download manually and run 'python setup.py install' on Pyramid I'm getting the same error: accessing standard pypi websites.
If I visit the sites in my browser it all works, but if I run the command it doesn't. Error as below.
I guess the fault will occur on most packages using these url's because I'm behind a proxy and my proxy is disallowing web access via python executable?
How do I specify pip or simply the apps setup.py to use my proxy, assuming this is the problem.
Installed c:\pymon\python34\lib\site-packages\pyramid-1.5.1-py3.4.egg
Processing dependencies for pyramid==1.5.1
Searching for PasteDeploy>=1.5.0
Reading https://pypi.python.org/simple/PasteDeploy/
Download error on https://pypi.python.org/simple/PasteDeploy/: timed out -- Some
packages may not be found!
Couldn't find index page for 'PasteDeploy' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: timed out -- Some packages may not be found!
No local packages or download links found for PasteDeploy>=1.5.0
error: Could not find suitable distribution for Requirement.parse('PasteDeploy>=
1.5.0')
My apologies I should have searched further:
Plone: pypi specific download issue behind a proxy server - can't install eggs
I created two environment variables: HTTP_PROXY and HTTPS_PROXY
Note the above comment regarding the --proxy argument also worked via pip.