My build machine doesn't have internet connection. so i created proxy repository in nexus with name "proxy_repo" which is pointing to https://pypi.org/. and created ~/.pip/pip.config in build machine.
https://pypi.org/ is allowed to access from build machine through nexus.
content of the pip.conf is as below
[global]
trusted-host=MyPrivate-nexusrepo.com
index = https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/pypi
index-url = https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple
when i execute any pip command, say "pip -v install django" , i always getting below error. can some one please help?
Collecting django
1 location(s) to search for versions of django:
* https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple/django/
Getting page https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple/django/
Looking up "https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple/django/" in the cache
No cache entry available
Starting new HTTPS connection (1): MyPrivate-nexusrepo.com
"GET /content/repositories/proxy_repo/simple/django/ HTTP/1.1" 404 None
Could not fetch URL https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple/django/: 404 Client Error: Not Found for url: https://MyPrivate-nexusrepo.com/content/repositories/proxy_repo/simple/django/ - skipping
Could not find a version that satisfies the requirement django (from versions: )
Cleaning up...
No matching distribution found for django
I have encountered this problem before, solved mine by settings my date and time.. if the computer date and time is not current it prevents data fetching from Python.org
One thing that often trips people up who are running in restricted environments is that access to both of these servers must be allowed through your corporate firewall:
https://pypi.org/
https://files.pythonhosted.org/
The reason for this is that requests made to the first URL often redirect to the second one for the content requested.
Related
I'm trying to run a client an server in python using flask_socketio, socketIO_client and SOCKET.IO in a raspberry pi 4 but I'm getting the following error:
The client is using an unsupported version of the Socket.IO or Engine.IO protocols (further occurrences of this error will be logged with level INFO)
192.168.1.80 - - [05/Feb/2021 18:30:41] "GET /socket.io/?EIO=3&transport=polling&t=NTpTT-L HTTP/1.1" 400 219 0.000618
These are my current versions:
pi#raspberrypi:~/Desktop/EDAdataLogger $ npm list socket.io
EDAdataLogger# /home/pi/Desktop/EDAdataLogger
└── socket.io#3.1.1
pi#raspberrypi:~/Desktop/EDAdataLogger $ npm list socket.io-client
EDAdataLogger# /home/pi/Desktop/EDAdataLogger
└── socket.io-client#3.1.1
python-engineio==4.0.0
python-socketio==5.0.4
Flask==1.1.2
Flask-Session==0.3.2
Flask-SocketIO==5.0.1
How can I define JavaScript Socket.IO version and Socket.IO protocol revision so everything matches according to (https://pypi.org/project/python-socketio/) ?
How can I fix this? Thank you
There appears to be some backward compatibility issues with SocketIO. You can uninstall python-engineio, python-socketio (and Flask-SocketIO just to be on the safe side) and reinstall lower versions.
The combination that worked for me was:
Flask-SocketIO==4.3.1
python-engineio==3.13.2
python-socketio==4.6.0
To fix the version incompatibility, you can run below "upgrade"commands:
pip install --upgrade python-socketio==4.6.0
pip install --upgrade python-engineio==3.13.2
pip install --upgrade Flask-SocketIO==4.3.1
flask-socketio-5.1.2
python-engineio-4.3.2
python-socketio-5.6.0
script src="//cdnjs.cloudflare.com/ajax/libs/socket.io/4.5.0/socket.io.js">
This worked for me. This error is due to dependency related to python-engineio .
After this, check your socket request shows EIO4 like this
"GET /socket.io/?EIO=4&transport=websocket&sid=mJ1g8wm0didssJSiAAAA HTTP/1.1" 200
My fix was to use the socket.io version, not cloudflare as the source
Check for the compatibility between the JS Client version and the Socket.IO server version here: https://socket.io/docs/v4/client-installation/ and accordingly upgrade/downgrade the client/server version.
You will need these modules on the server side:
Flask-SocketIO
python-engineio
python-socketio
You will have this kind of URL in your client:
//cdnjs.cloudflare.com/ajax/libs/socket.io/
One working example, which I'm using:
On Server side:
Flask-SocketIO==5.2.0
python-engineio==4.3.3
python-socketio==5.7.1
simple-websocket==0.7.0
On Client side:
//cdnjs.cloudflare.com/ajax/libs/socket.io/4.2.0/socket.io.js
Good day all,
I tried to install the plotly package on my new work laptop (Windows 10) with the following code:
conda install -c plotly plotly
and I encountered the following error:
Collecting package metadata (current_repodata.json): failed
CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://conda.anaconda.org/plotly/win-64/current_repodata.json>
Elapsed: -
An HTTP error occurred when trying to retrieve this URL.
HTTP errors are often intermittent, and a simple retry will get you on your way.
'https://conda.anaconda.org/plotly/win-64'
I have tried the following:
Installing the package using my home wifi instead of the company's
Executing conda config --set ssl_verify no
Executing conda config --set ssl_verify false
Copying the 2 files (libcrypto-1_1-x64.dll, libssl-1_1-x64.dll) from Anaconda3\Library\bin to Anaconda3\DLLs.
Interestingly, I was unable to find current_repodata.json file in https://repo.anaconda.com/pkgs/main/win-64/.
Does anyone know how do I create this current_repodata.json file?
Thank you!
I faced similar problems and tried the above options to my dismay.
But somewhere on the internet I had read an answer about using VPN and try different servers and then install using conda.
This seems to work for me now.
Thanks.
Are you in a corporate network behind a proxy?
This issue looks to me like you don't have connection to the internet and your proxy is blocking the connection to https://conda.anaconda.org/plotly/win-64/current_repodata.json
Please try this guide to use conda behind a proxy:
https://docs.anaconda.com/anaconda/user-guide/tasks/proxy/
I need to deploy a replica of PyPI on an internal network. The idea is to have all the PyPI packages in the local repository, avoiding to connect to the real PyPI repo all the time.
I used bandersnatch to mirror the files of PyPI accoring to PEP381.
Than on clients' pip I dropped /etc/pip.conf as following
[global]
index-url = http://www.myserver.com/repo/PyPI/web/simple
trusted-host = www.myserver.com
On the clients machine the command:
pip install -v <some packages>
works using the local repo. However the command
pip search --index http://www.myserver.com/repo/PyPI/web/simple <some packages>
doesn' t work and returns
raise HTTPError(http_error_msg, response=self)
pip._vendor.requests.exceptions.HTTPError: 404 Client Error: Not Found for url: http://www.myserver.com/repo/PyPI/web/
Here are 2 questions:
Is it possible to enable the pip search command without install a local PyPI server such as pypiserver?
Moreover, is it possible to fallback to the official PyPI server if the local pip install commands fails (e.g. local is not present)?
Thanks
Charlie
bandersnatch just copies packages which is not enough to have a replica of PyPI. You need a server-side program like pypiserver, devpi, Artifactory, Nessus…
I've seen devpi use /+simple/, you might need your reverse Proxy to rewrite the URL so that Artifactory can use it (/simple is requirement of repo type in Artifactory)
I'm using Windows 10 pro(x64) and I have just installed Anaonda 4.3.1
But whenever I try to install a package or update conda, it shows an error like the below.
(d:\Miniconda3) C:\Windows\system32>conda update conda
Fetching package metadata .....
CondaHTTPError: HTTP None None for url <None>
Elapsed: None
An HTTP error occurred when trying to retrieve this URL.
SSLError(SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'sslv3 alert bad record mac')],)",),),)
conda config --set ssl_verify False doesn't make any difference either.
I have no problem installing packages using pip.
These errors coming from such abstracting (i.e. with a high level of abstraction) tools are usually really hard to debug from the tool themselves (it requires quite a lot of digging around in the tool's code to pinpoint and finally find the issue); to the extent that in the vast majority of cases, once you've debugged it, you know enough about the tool in question to actually be able to write a patch to solve that problem.
What I would recommend is to first trace how does conda get the metadata it is getting at first (first line of your output). On UNIX I would recommend tcpdump, but on windows I would use wireshark (albeit according to the wikipedia page for tcpdump, it works on windows too).
Once you know what host the package should be obtained from, you can try to understand why it occurs. Namely, the bad record mac error should not occur under normal conditions; i.e. either you have a network problem (try with another network) or there is a server (more likely if conda used to work) or client problem.
To try to debug the SSL issue once you know the host, run:
openssl s_client -connect $host:443 -msg -debug
Where $host is the host you found using tcpdump/wireshark.
Best of luck!
Note: I have not linked wireshark.org in this answer, but instead the wikipedia page for wireshark to prevent supporting bogus security practices 1,2. Please do not edit that link.
I am completely new to Ubunut and Linux so I really have no clue what I am doing wrong here. I'm copying this code out of a book I am using to learn penetration testing with python for a college course, but the code is not working. Below I have the code as I am entering it into terminal, followed by the response that it elicits. What is wrong with the code that I am entering?
programmer:~# wget http://zael.org/norman/python/python-nmap/python-nmap-0.3.2.tar.gz-On map.tar.gz
Resolving xael.org (xael.org)... 213.152.29.60
Connecting to xael.org (xael.org)|213.152.29.60|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2014-01-21 16:10:51 ERROR 404: Not Found.
--2014-01-21 16:10:51-- http://nmap.tar.gz/
Resolving nmap.tar.gz (nmap.tar.gz)... failed: Name or service not known.
wget: unable to resolve host address `nmap.tar.gz'
It because you missed a white space between link and the -O option , try:
wget http://xael.org/norman/python/python-nmap/python-nmap-0.3.2.tar.gz
you could also use pip to install package
pip install python-nmap