python2.7 -m pip install socket
Collecting socket
Using cached socket-0.5.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-NGBb1T/socket/setup.py", line 2, in <module> raise RuntimeError("Package 'socket' must not be downloaded from pypi")
RuntimeError: Package 'socket' must not be downloaded from pypi
Command «python setup.py egg_info» failed with error code 1 in /tmp/pip-build-NGBb1T/socket/
Gianluca
3,2272 gold badges34 silver badges35 bronze badges
asked Feb 21, 2017 at 13:37
3
If you just want to use the python socket then you don’t need to install it seperately, coz it’s already included in standard library.
But if you are trying to install some other package which requires socket lib , then in setup.py
of that package, you can see it consists of a single line:
raise RuntimeError("Package 'socket' must not be downloaded from pypi")
socket
module is already included in the standard library. You don’t have to download anything. Just type import socket
and you’re all set.
answered Feb 21, 2017 at 14:50
U.SwapU.Swap
1,9214 gold badges23 silver badges41 bronze badges
Can’t install this package only with the PyCharm or command prompt:
Collecting socket
Using cached socket-0.5.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "C:\Users\ADMIN_~1\AppData\Local\Temp\pip-build-v6d_dkqz\socket\setup.py", line 2, in <module>
raise RuntimeError("Package 'socket' must not be downloaded from pypi")
RuntimeError: Package 'socket' must not be downloaded from pypi
Command "python setup.py egg_info" failed with error code 1 in C:\Users\ADMIN_~1\AppData\Local\Temp\pip-build-v6d_dkqz\socket\
Downloading package separately and installing doesn’t work too.
SiHa
7,89813 gold badges34 silver badges43 bronze badges
asked Oct 16, 2016 at 8:08
If you open the file you downloaded, I mean setup.py
, you notice it consists of a single line:
raise RuntimeError("Package 'socket' must not be downloaded from pypi")
socket
module is already included in the standard library. You don’t have to download anything. Just type import socket
and you’re all set.
answered Oct 16, 2016 at 10:41
u354356007u354356007
3,20515 silver badges25 bronze badges
(MyPythonEnv) C:Userszhaosong>pip install scipy Collecting scipy Downloading scipy-1.7.1-cp38-cp38-win_amd64.whl (33.7 MB) |████ | 4.4 MB 13 kB/s eta 0:37:21ERROR: Exception: Traceback (most recent call last): File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorurllib3response.py", line 438, in _error_catcher yield File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorurllib3response.py", line 519, in read data = self._fp.read(amt) if not fp_closed else b"" File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorcachecontrolfilewrapper.py", line 62, in read data = self.__fp.read(amt) File "C:Userszhaosonganaconda3envsMyPythonEnvlibhttpclient.py", line 458, in read n = self.readinto(b) File "C:Userszhaosonganaconda3envsMyPythonEnvlibhttpclient.py", line 502, in readinto n = self.fp.readinto(b) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsocket.py", line 669, in readinto return self._sock.recv_into(b) File "C:Userszhaosonganaconda3envsMyPythonEnvlibssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "C:Userszhaosonganaconda3envsMyPythonEnvlibssl.py", line 1099, in read return self._sslobj.read(len, buffer) socket.timeout: The read operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalclibase_command.py", line 173, in _main status = self.run(options, args) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalclireq_command.py", line 203, in wrapper return func(self, options, args) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalcommandsinstall.py", line 315, in run requirement_set = resolver.resolve( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibresolver.py", line 94, in resolve result = self._result = resolver.resolve( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorresolvelibresolvers.py", line 472, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorresolvelibresolvers.py", line 341, in resolve self._add_to_criteria(self.state.criteria, r, parent=None) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorresolvelibresolvers.py", line 172, in _add_to_criteria if not criterion.candidates: File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorresolvelibstructs.py", line 151, in __bool__ return bool(self._sequence) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibfound_candidates.py", line 140, in __bool__ return any(self) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibfound_candidates.py", line 128, in <genexpr> return (c for c in iterator if id(c) not in self._incompatible_ids) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibfound_candidates.py", line 32, in _iter_built candidate = func() File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibfactory.py", line 204, in _make_candidate_from_link self._link_candidate_cache[link] = LinkCandidate( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibcandidates.py", line 295, in __init__ super().__init__( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibcandidates.py", line 156, in __init__ self.dist = self._prepare() File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibcandidates.py", line 227, in _prepare dist = self._prepare_distribution() File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibcandidates.py", line 305, in _prepare_distribution return self._factory.preparer.prepare_linked_requirement( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internaloperationsprepare.py", line 508, in prepare_linked_requirement return self._prepare_linked_requirement(req, parallel_builds) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internaloperationsprepare.py", line 550, in _prepare_linked_requirement local_file = unpack_url( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internaloperationsprepare.py", line 239, in unpack_url file = get_http_url( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internaloperationsprepare.py", line 102, in get_http_url from_path, content_type = download(link, temp_dir.path) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalnetworkdownload.py", line 145, in __call__ for chunk in chunks: File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalcliprogress_bars.py", line 144, in iter for x in it: File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalnetworkutils.py", line 63, in response_chunks for chunk in response.raw.stream( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorurllib3response.py", line 576, in stream data = self.read(amt=amt, decode_content=decode_content) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorurllib3response.py", line 541, in read raise IncompleteRead(self._fp_bytes_read, self.length_remaining) File "C:Userszhaosonganaconda3envsMyPythonEnvlibcontextlib.py", line 131, in __exit__ self.gen.throw(type, value, traceback) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorurllib3response.py", line 443, in _error_catcher raise ReadTimeoutError(self._pool, None, "Read timed out.") pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
(MyPythonEnv) C:Userszhaosong>pip install scipy Collecting scipy Downloading scipy-1.7.1-cp38-cp38-win_amd64.whl (33.7 MB) |████ | 4.4 MB 13 kB/s eta 0:37:21ERROR: Exception: Traceback (most recent call last): File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorurllib3response.py", line 438, in _error_catcher yield File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorurllib3response.py", line 519, in read data = self._fp.read(amt) if not fp_closed else b"" File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorcachecontrolfilewrapper.py", line 62, in read data = self.__fp.read(amt) File "C:Userszhaosonganaconda3envsMyPythonEnvlibhttpclient.py", line 458, in read n = self.readinto(b) File "C:Userszhaosonganaconda3envsMyPythonEnvlibhttpclient.py", line 502, in readinto n = self.fp.readinto(b) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsocket.py", line 669, in readinto return self._sock.recv_into(b) File "C:Userszhaosonganaconda3envsMyPythonEnvlibssl.py", line 1241, in recv_into return self.read(nbytes, buffer) File "C:Userszhaosonganaconda3envsMyPythonEnvlibssl.py", line 1099, in read return self._sslobj.read(len, buffer) socket.timeout: The read operation timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalclibase_command.py", line 173, in _main status = self.run(options, args) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalclireq_command.py", line 203, in wrapper return func(self, options, args) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalcommandsinstall.py", line 315, in run requirement_set = resolver.resolve( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibresolver.py", line 94, in resolve result = self._result = resolver.resolve( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorresolvelibresolvers.py", line 472, in resolve state = resolution.resolve(requirements, max_rounds=max_rounds) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorresolvelibresolvers.py", line 341, in resolve self._add_to_criteria(self.state.criteria, r, parent=None) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorresolvelibresolvers.py", line 172, in _add_to_criteria if not criterion.candidates: File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorresolvelibstructs.py", line 151, in __bool__ return bool(self._sequence) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibfound_candidates.py", line 140, in __bool__ return any(self) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibfound_candidates.py", line 128, in <genexpr> return (c for c in iterator if id(c) not in self._incompatible_ids) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibfound_candidates.py", line 32, in _iter_built candidate = func() File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibfactory.py", line 204, in _make_candidate_from_link self._link_candidate_cache[link] = LinkCandidate( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibcandidates.py", line 295, in __init__ super().__init__( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibcandidates.py", line 156, in __init__ self.dist = self._prepare() File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibcandidates.py", line 227, in _prepare dist = self._prepare_distribution() File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalresolutionresolvelibcandidates.py", line 305, in _prepare_distribution return self._factory.preparer.prepare_linked_requirement( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internaloperationsprepare.py", line 508, in prepare_linked_requirement return self._prepare_linked_requirement(req, parallel_builds) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internaloperationsprepare.py", line 550, in _prepare_linked_requirement local_file = unpack_url( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internaloperationsprepare.py", line 239, in unpack_url file = get_http_url( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internaloperationsprepare.py", line 102, in get_http_url from_path, content_type = download(link, temp_dir.path) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalnetworkdownload.py", line 145, in __call__ for chunk in chunks: File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalcliprogress_bars.py", line 144, in iter for x in it: File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_internalnetworkutils.py", line 63, in response_chunks for chunk in response.raw.stream( File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorurllib3response.py", line 576, in stream data = self.read(amt=amt, decode_content=decode_content) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorurllib3response.py", line 541, in read raise IncompleteRead(self._fp_bytes_read, self.length_remaining) File "C:Userszhaosonganaconda3envsMyPythonEnvlibcontextlib.py", line 131, in __exit__ self.gen.throw(type, value, traceback) File "C:Userszhaosonganaconda3envsMyPythonEnvlibsite-packagespip_vendorurllib3response.py", line 443, in _error_catcher raise ReadTimeoutError(self._pool, None, "Read timed out.") pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.
Loading