pip not working on ubuntu 12.04 - python

My system is ubuntu 12.04 with python 2.7. This machine is behind a corporate firewall..
I have set up required proxies and everything works fine (internet, download.. browsing, sudo apt-get etc)
But the pip install is not working.
So for example,if i try to install celery, in pip log I see the following error:
/usr/bin/pip run on Thu Mar 20 15:32:15 2014
Downloading/unpacking celery
Getting page http://pypi.python.org/simple/celery
Could not fetch URL http://pypi.python.org/simple/celery: timed out
Will skip URL http://pypi.python.org/simple/celery when looking for download links for celery
Getting page http://pypi.python.org/simple/
Could not fetch URL http://pypi.python.org/simple/: timed out
Will skip URL http://pypi.python.org/simple/ when looking for download links for celery
Cannot fetch index base URL http://pypi.python.org/simple/
URLs to search for versions for celery:
* http://pypi.python.org/simple/celery/
Getting page http://pypi.python.org/simple/celery/
Could not fetch URL http://pypi.python.org/simple/celery/: timed out
Will skip URL http://pypi.python.org/simple/celery/ when looking for download links for celery
Could not find any downloads that satisfy the requirement celery
No distributions at all found for celery
Exception information:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 126, in main
self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 223, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 948, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 152, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for celery

PIP doesn't support authenticated proxies. Do you have such proxy? Try disabling it if possible.
If you can't, you can try to install a proxy authentication service CNTLM.
After you install CNTLM, you can try running pip like this:
export HTTP_PROXY=http://127.0.0.1:3128
sudo -E pip install some_package
Here you have a detailed example for the same thing, only with Ruby gems:
http://annelagang.blogspot.com/2012/11/installing-gems-in-ubuntu-1204-using.html

Related

Azure ML error: NotImplementedError: Linux distribution debian 11. does not have automatic support

I am trying to train my model as an Azure ML job.
I train my model as a Docker container. However I keep getting this error when executing the Azure ML job:
Warning: Falling back to use azure cli login credentials.
If you run your code in unattended mode, i.e., where you can't give a user input, then we recommend to use ServicePrincipalAuthentication or MsiAuthentication.
Please refer to aka.ms/aml-notebook-auth for different authentication mechanisms in azureml-sdk.
2022-10-24 13:01:49.839951 | ActivityCompleted: Activity=_dataflow, HowEnded=Failure, Duration=903.73 [ms], Info = {'activity_id': '9a734e5b-752b-4f5d-bcc3-682eee0346eb', 'activity_name': '_dataflow', 'activity_type': 'InternalCall', 'app_name': 'dataset', 'source': 'azureml.dataset', 'version': '1.46.0', 'dataprepVersion': '4.5.7', 'sparkVersion': '', 'subscription': '308339c6-d455-4395-ae62-5de2a35792e6', 'run_id': 'experiment-niels-i4t_1666616328_bd67e032', 'resource_group': 'i4talent_mlops', 'workspace_name': 'mlops_template', 'experiment_id': '0e131a58-b02e-471f-bf9f-e8c12dfc045f', 'location': 'germanywestcentral', 'completionStatus': 'Success', 'durationMs': 364.36}, Exception=NotImplementedError; Linux distribution debian 11. does not have automatic support.
Missing packages: {'liblttng-ust.so.0', 'libcurl.so.4'}
.NET Core 3.1 can still be used via `dotnetcore2` if the required dependencies are installed.
Visit https://aka.ms/dotnet-install-linux for Linux distro specific .NET Core install instructions.
Follow your distro specific instructions to install `dotnet-runtime-*` and replace `*` with `3.1.23`.
2022-10-24 13:01:49.839875 | ActivityCompleted: Activity=to_pandas_dataframe, HowEnded=Failure, Duration=904.0 [ms], Info = {'activity_id': '043091e8-2c47-4a1d-be34-72200a827822', 'activity_name': 'to_pandas_dataframe', 'activity_type': 'PublicApi', 'app_name': 'TabularDataset', 'source': 'azureml.dataset', 'version': '1.46.0', 'dataprepVersion': '4.5.7', 'sparkVersion': '', 'subscription': '308339c6-d455-4395-ae62-5de2a35792e6', 'run_id': 'experiment-niels-i4t_1666616328_bd67e032', 'resource_group': 'i4talent_mlops', 'workspace_name': 'mlops_template', 'experiment_id': '0e131a58-b02e-471f-bf9f-e8c12dfc045f', 'location': 'germanywestcentral', 'completionStatus': 'Success', 'durationMs': 364.36}, Exception=NotImplementedError; Linux distribution debian 11. does not have automatic support.
Missing packages: {'liblttng-ust.so.0', 'libcurl.so.4'}
.NET Core 3.1 can still be used via `dotnetcore2` if the required dependencies are installed.
Visit https://aka.ms/dotnet-install-linux for Linux distro specific .NET Core install instructions.
Follow your distro specific instructions to install `dotnet-runtime-*` and replace `*` with `3.1.23`.
Cleaning up all outstanding Run operations, waiting 300.0 seconds
1 items cleaning up...
Cleanup took 0.08137202262878418 seconds
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/dotnetcore2/runtime.py", line 271, in attempt_get_deps
blob_deps_to_file()
File "/usr/local/lib/python3.9/site-packages/dotnetcore2/runtime.py", line 263, in blob_deps_to_file
blob = request.urlopen(deps_url, context=ssl_context)
File "/usr/local/lib/python3.9/urllib/request.py", line 214, in urlopen
return opener.open(url, data, timeout)
File "/usr/local/lib/python3.9/urllib/request.py", line 523, in open
response = meth(req, response)
File "/usr/local/lib/python3.9/urllib/request.py", line 632, in http_response
response = self.parent.error(
File "/usr/local/lib/python3.9/urllib/request.py", line 561, in error
return self._call_chain(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 494, in _call_chain
result = func(*args)
File "/usr/local/lib/python3.9/urllib/request.py", line 641, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 404: Not Found
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "train.py", line 5, in <module>
train()
File "/usr/local/lib/python3.9/site-packages/mlops_i4t/machine_learning/model_utils.py", line 56, in train
df = dataset.to_pandas_dataframe()
File "/usr/local/lib/python3.9/site-packages/azureml/data/_loggerfactory.py", line 132, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/azureml/data/tabular_dataset.py", line 168, in to_pandas_dataframe
dataflow = get_dataflow_for_execution(self._dataflow, 'to_pandas_dataframe', 'TabularDataset')
File "/usr/local/lib/python3.9/site-packages/azureml/data/_loggerfactory.py", line 132, in wrapper
return func(*args, **kwargs)
File "/usr/local/lib/python3.9/site-packages/azureml/data/abstract_dataset.py", line 221, in _dataflow
dataprep().api._datastore_helper._set_auth_type(self._registration.workspace)
File "/usr/local/lib/python3.9/site-packages/azureml/dataprep/api/_datastore_helper.py", line 177, in _set_auth_type
get_engine_api().set_aml_auth(SetAmlAuthMessageArgument(auth_type, json.dumps(auth_value)))
File "/usr/local/lib/python3.9/site-packages/azureml/dataprep/api/engineapi/api.py", line 19, in get_engine_api
_engine_api = EngineAPI()
File "/usr/local/lib/python3.9/site-packages/azureml/dataprep/api/engineapi/api.py", line 102, in __init__
self._message_channel = launch_engine()
File "/usr/local/lib/python3.9/site-packages/azureml/dataprep/api/engineapi/engine.py", line 333, in launch_engine
dependencies_path = runtime.ensure_dependencies()
File "/usr/local/lib/python3.9/site-packages/dotnetcore2/runtime.py", line 285, in ensure_dependencies
if not attempt_get_deps(missing_pkgs):
File "/usr/local/lib/python3.9/site-packages/dotnetcore2/runtime.py", line 279, in attempt_get_deps
raise NotImplementedError(err_msg + '\n' + _unsupported_help_msg)
NotImplementedError: Linux distribution debian 11. does not have automatic support.
Missing packages: {'liblttng-ust.so.0', 'libcurl.so.4'}
.NET Core 3.1 can still be used via `dotnetcore2` if the required dependencies are installed.
Visit https://aka.ms/dotnet-install-linux for Linux distro specific .NET Core install instructions.
Follow your distro specific instructions to install `dotnet-runtime-*` and replace `*` with `3.1.23`.
My cluster where I run this job on is a STANDARD_DS3_V2.
Furthermore, my Dockerfile looks as follows:
FROM python:3.9-slim
RUN pip install azure-cli
RUN az login --service-principal -u "xxxxxxxx" -p "xxxxxx" --tenant "xxxxxx"
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN pip install . --use-feature=fast-deps
RUN echo "Finished installing packages."
I am lost tbh... Did anyone experience the same?
How can I change the dot net core version in my Docker?
Debian is not supportive of all the .net versions. Debian 11 will function with .Net core 3.1, and .Net 6.
The following versions of .NET are no longer supported:
• .NET 5
• .NET Core 3.0
• .NET Core 2.2
• .NET Core 2.1
• .NET Core 2.0
Before installing .Net, run the commands which are mentioned below to add the Microsoft package signing key to your list of trusted keys.
wget https://packages.microsoft.com/config/debian/11/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
Install the .Net SDK allows you to install .Net 6.0.
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-6.0
using the following commands we can work with the Debian 11 connectivity.

pip, proxy authentication and "Not supported proxy scheme"

Trying to install pip on a new python installation. I am stuck with proxy errors. Looks like a bug in get-pip or urllib3??
Question is do I have to go through the pain of setting up CNTLM as described here or is there a shortcut?
get-pip.py documentation says use --proxy="[user:passwd#]proxy.server:port" option to specify proxy and relevant authentication. But seems like pip passes on the whole thing as it is to urllib3 which interprets "myusr" as the url scheme, because of the ':' I guess (?).
C:\ProgFiles\Python27>get-pip.py --proxy myusr:mypswd#111.222.333.444:80
Downloading/unpacking pip
Cleaning up...
Exception:
Traceback (most recent call last):
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\req.py", line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\index.py", line 194, in find_requirement
page = self._get_page(main_index_url, req)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\index.py", line 568, in _get_page
session=self.session,
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\index.py", line 670, in get_page
resp = session.get(url, headers={"Accept": "text/html"})
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\_vendor\requests\sessions.py", line 468, in get
return self.request('GET', url, **kwargs)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\download.py", line 237, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\_vendor\requests\sessions.py", line 456, in request
resp = self.send(prep, **send_kwargs)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\_vendor\requests\sessions.py", line 559, in send
r = adapter.send(request, **kwargs)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\_vendor\requests\adapters.py", line 305, in send
conn = self.get_connection(request.url, proxies)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\_vendor\requests\adapters.py", line 215, in get_connection
block=self._pool_block)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\_vendor\requests\packages\urllib3\poolmanager.py", line 258, in proxy_fro
m_url
return ProxyManager(proxy_url=url, **kw)
File "c:\users\sg0219~1\appdata\local\temp\tmpxwg_en\pip.zip\pip\_vendor\requests\packages\urllib3\poolmanager.py", line 214, in __init__
'Not supported proxy scheme %s' % self.proxy.scheme
AssertionError: Not supported proxy scheme myusr
Storing debug log for failure in C:\Users\myusr\pip\pip.log
C:\ProgFiles\Python27>
When I run the command without the usrname and password it works fine, but proxy rejects the request saying it needs authentication ("407 authenticationrequired").
C:\ProgFiles\Python27>get-pip.py --proxy 111.222.333.444:80
Downloading/unpacking pip
Cannot fetch index base URL https://pypi.python.org/simple/
Could not find any downloads that satisfy the requirement pip
Cleaning up...
No distributions at all found for pip
Storing debug log for failure in C:\Users\sg0219898\pip\pip.log
C:\ProgFiles\Python27>cat C:\Users\sg0219898\pip\pip.log
------------------------------------------------------------
C:\ProgFiles\Python27\get-pip.py run on 09/29/14 16:23:26
Downloading/unpacking pip
Getting page https://pypi.python.org/simple/pip/
Could not fetch URL https://pypi.python.org/simple/pip/: connection error: ('Cannot connect to proxy.', error('Tunnel connection failed: 407 authenticationrequired',))
Will skip URL https://pypi.python.org/simple/pip/ when looking for download links for pip
Getting page https://pypi.python.org/simple/
Could not fetch URL https://pypi.python.org/simple/: connection error: ('Cannot connect to proxy.', error('Tunnel connection failed: 407 authenticationrequired',))
Will skip URL https://pypi.python.org/simple/ when looking for download links for pip
Cannot fetch index base URL https://pypi.python.org/simple/
URLs to search for versions for pip:
* https://pypi.python.org/simple/pip/
Getting page https://pypi.python.org/simple/pip/
Could not fetch URL https://pypi.python.org/simple/pip/: connection error: ('Cannot connect to proxy.', error('Tunnel connection failed: 407 authenticationrequired',))
Will skip URL https://pypi.python.org/simple/pip/ when looking for download links for pip
Could not find any downloads that satisfy the requirement pip
Cleaning up...
Removing temporary dir c:\users\sg0219~1\appdata\local\temp\pip_build_SG0219898...
No distributions at all found for pip
Exception information:
Traceback (most recent call last):
File "c:\users\sg0219~1\appdata\local\temp\tmp36ynxd\pip.zip\pip\basecommand.py", line 122, in main
status = self.run(options, args)
File "c:\users\sg0219~1\appdata\local\temp\tmp36ynxd\pip.zip\pip\commands\install.py", line 278, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "c:\users\sg0219~1\appdata\local\temp\tmp36ynxd\pip.zip\pip\req.py", line 1177, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "c:\users\sg0219~1\appdata\local\temp\tmp36ynxd\pip.zip\pip\index.py", line 277, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for pip
C:\ProgFiles\Python27>
I had a brief look at urllib3\poolmanager.py and it doesn't seem to have anything to do with username/passwords.
This is complaining about the scheme for the URL (which urlparse is understanding to be myusr), to work around that you should instead be doing:
get-pip.py --proxy http://myusr:mypswd#111.222.333.444:80
This is because the script requires the environment variables http_proxy or https_proxy contains the scheme in the URL. Set the environment variables
export http_proxy="http://<hostname>:<port>"
export https_proxy="https://<hostname>:<port>"
before run the "python get-pip.py"
import requests
proxy = {
'http' : 'http://138.197.222.35:80',
'https' : 'http://1138.197.222.35:8080'
}
r = requests.get('http://httpbin.org/ip', proxies=proxy)
print (r)
Append 'http://' and 'https://' with your ips.
I had this issue when working with linux, windows worked fine with ip alone.
Use pip install xxx --proxy=https://xx.xx.xx.xx:xxxx
After Python 3.6, when using the proxy, the parameter value of proxies in requests.get(url=url, headers=headers, proxies=...) changed.
Before 3.6 includes, proxies={ 'https': '127.0.0.1:8080'} or proxies={'http': '127.0.0.1:8080'} is fine, but this type of dictionary is not suitable for Python 3.7 and above.
In Python3.7 and above, you must add http:// or https:// in front of ip:port, that is, proxies={'http':'http://127.0.0.1:8080'} or proxies={'https':'https://127.0.0.1:8080'}
For the problem you have mentioned, it depends on how the proxy server authentication has been set up.
For example, my intranet uses Windows AD and probably the proxy server is using Windows Integrated auth. Thus when I do pip install --proxy http://<server-ip>:<port> <module-name>, it works fine. Note that I did not have to type in username & password ,likely due to integrated auth.
So, you'll need to find out the authentication being used by your proxy server.You can use Fiddler(or any other network analyzer) tool to check the WWW-Authenticate headers in the 407 response, to check what auth mechs the server supports.
This can be a case when you use ";" in your passwords. This cannot be parsed properly that results in ProxySchemeUnknown error raised.
The below things worked for me :
Step 1) Set HTTPS_PROXY and HTTP_PROXY:
export HTTPS_PROXY="http://proxy-address:8080"
export HTTP_PROXY="http://proxy-address:8080"
step 2) : Run pip with below configuration
./pip.exe install pyspark --trusted-host pypi.python.org --trusted-host files.pythonhosted.org --trusted-host pypi.org --proxy "proxy-address:8080"
On Windows you can use the SET command instead of export:
SET HTTP_PROXY="http://proxy-address:8080"
SET HTTPS_PROXY="http://proxy-address:8080"
If you are not behind a proxy, you need to unset like this:
SET HTTP_PROXY=
SET HTTPS_PROXY=
it works to install boto3 on win7.
pip install boto3 --proxy=https://user:pwd#x.x.x.x:8080
Collecting boto3
Downloading boto3-1.20.33-py3-none-any.whl (131 kB)
Collecting botocore<1.24.0,>=1.23.33
Downloading botocore-1.23.33-py3-none-any.whl (8.5 MB)
Collecting s3transfer<0.6.0,>=0.5.0
Downloading s3transfer-0.5.0-py3-none-any.whl (79 kB)
Collecting jmespath<1.0.0,>=0.7.1
Downloading jmespath-0.10.0-py2.py3-none-any.whl (24 kB)
Collecting python-dateutil<3.0.0,>=2.1
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
Collecting urllib3<1.27,>=1.25.4
Downloading urllib3-1.26.8-py2.py3-none-any.whl (138 kB)
Collecting six>=1.5
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: six, python-dateutil, jmespath, urllib3, botocore, s3transfer, boto3
Successfully installed boto3-1.20.33 botocore-1.23.33 jmespath-0.10.0 python-dateutil-2.8.2 s3transfer-0.5.0 six-1.16.0 urllib3-1.26.8

Why can't I install PyQt5 from the pypi?

I want to use PyQt5 in pycharm. After trying to install the package from Available packages, an error says: 'Install packages failed: Error occurred when installing package PyQt5.'
The complete log is here:
------------------------------------------------------------
C:\Program Files (x86)\JetBrains\PyCharm 3.0.1\helpers\packaging_tool.py run on 02/05/14 16:13:23
Downloading/unpacking PyQt5
Getting page https://pypi.python.org/simple/PyQt5/
URLs to search for versions for PyQt5:
* https://pypi.python.org/simple/PyQt5/
Analyzing links from page https://pypi.python.org/simple/PyQt5/
Could not find any downloads that satisfy the requirement PyQt5
No distributions at all found for PyQt5
Exception information:
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\basecommand.py", line 139, in main
status = self.run(options, args)
File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\commands\install.py", line 266, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\req.py", line 1026, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "C:\Python27\lib\site-packages\pip-1.3.1-py2.7.egg\pip\index.py", line 171, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for PyQt5
What should I do?
This is what I've done is this:
Installed Python 3.3 and added to PATH
Installed PyQt5-5.2-gpl-Py3.3-Qt5.2.0-x64.exe
And I don't know how to use PyQt in pycharm.
can you provide more information?
AFAIK, you cannot install PyQt4/PyQt5 from PyPI. You would have to install it separately.
If you see this link, you can see that there are no listed packages for PyQt5 (likewise for PyQt4) on PyPI. So, you would need to download the installer separately from here and install it.
That is what the
DistributionNotFound: No distributions at all found for PyQt5
refers to.
[UPDATE]: You'll also most likely need to install sip the same way, here's how: https://askubuntu.com/a/666336/12214
FYI, installing QtPy5 with pip works in 3.6.5. According to https://www.riverbankcomputing.com/software/sip/download even 3.5 and later.

Download URL for PyPi Package

I am written a small package and have successfully uploaded the package to pypi but when i do to install using pip, this traceback comes and it never gets installed.
Downloading/unpacking pytransmit
Getting page https://pypi.python.org/simple/pytransmit/
URLs to search for versions for pytransmit:
* https://pypi.python.org/simple/pytransmit/
Analyzing links from page https://pypi.python.org/simple/PyTransmit/
Could not find any downloads that satisfy the requirement pytransmit
Cleaning up...
Removing temporary dir c\temp\pip_build_dd...
No distributions at all found for pytransmit
Exception information:
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 270, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "C:\Python27\lib\site-packages\pip\req.py", line 1157, in prepare_files
url = finder.find_requirement(req_to_install, upgrade=self.upgrade)
File "C:\Python27\lib\site-packages\pip\index.py", line 285, in find_requirement
raise DistributionNotFound('No distributions at all found for %s' % req)
DistributionNotFound: No distributions at all found for pytransmit
How shall i make it installable using pip.
You don't have any files to download. You can follow the official tutorial and upload your package files.
Essencially you need to register your package first -
python setup.py register
and then upload the distributables -
python setup.py sdist bdist_wininst upload

pip install won't install on my machine

so, i am trying to upgrade my Django version to 1.4.2, but when i do pip install Django==1.4.2 -vvv i get:
Will skip URL http://awdb.pypi.python.org/simple/Django/ when looking for download links for Django==1.4.2
Getting page http://jlxn.pypi.python.org/simple/Django/
Could not fetch URL http://euea.pypi.python.org/simple/Django/: <urlopen error [Errno -3] Temporary failure in name resolution>
Will skip URL http://euea.pypi.python.org/simple/Django/ when looking for download links for Django==1.4.2
Getting page http://krrw.pypi.python.org/simple/Django/
Could not fetch URL http://hfyu.pypi.python.org/simple/Django/: <urlopen error [Errno -3] Temporary failure in name resolution>
Will skip URL http://hfyu.pypi.python.org/simple/Django/ when looking for download links for Django==1.4.2
Getting page http://ixoj.pypi.python.org/simple/Django/
when using --verbose i noticed that i got a :
pip install -i --verbose http://d.pypi.python.org/simple Django==1.4.2
Downloading/unpacking http://d.pypi.python.org/simple
Downloading simple (1.7Mb): 1.7Mb downloaded
Cannot unpack file /tmp/pip-zgK95n-unpack/simple (downloaded from /tmp/pip-NFrk4r-build, content-type: text/html; charset=utf-8); cannot detect archive format
Cannot determine archive format of /tmp/pip-NFrk4r-build
Storing complete log in /home/administrator/.pip/pip.log
info in the log:
Exception information:
Traceback (most recent call last):
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
status = self.run(options, args)
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 245, in run
requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 985, in prepare_files
self.unpack_url(url, location, self.is_download)
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1109, in unpack_url
retval = unpack_http_url(link, location, self.download_cache, self.download_dir)
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/download.py", line 456, in unpack_http_url
unpack_file(temp_location, location, content_type, link)
File "/home/administrator/.virtualenvs/xxx/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/util.py", line 505, in unpack_file
raise InstallationError('Cannot determine archive format of %s' % location)
InstallationError: Cannot determine archive format of /tmp/pip-NFrk4r-build
any ideas?
i was able to solve it by doing this:
pip install --verbose https://pypi.python.org/packages/source/D/Django/Django-1.4.2.tar.gz#md5=6ffecdc01ad360e1abdca1015ae0893a
the problem is that i still don't know the cause of the problem in the first place

Categories

Resources