Closed YueXiaoqian closed 4 years ago
Looks like you didn't set up your path correctly. Please try to add the path in your system.
Or if you only want to change the path within this Python session, try:
import sys sys.path.append(...) # add the path to util here
Thanks for your response!I can now successfully import the package.But when I run:
There is an URLError: URLError: <urlopen error [Errno 11004] getaddrinfo failed>
URLError? can you print out the stack trace and see which URL is it requesting?
gaierror Traceback (most recent call last) ~\anaconda3\lib\urllib\request.py in do_open(self, http_class, req, **http_conn_args) 1318 h.request(req.get_method(), req.selector, req.data, headers, -> 1319 encode_chunked=req.has_header('Transfer-encoding')) 1320 except OSError as err: # timeout error
~\anaconda3\lib\http\client.py in request(self, method, url, body, headers, encode_chunked) 1251 """Send a complete request to the server.""" -> 1252 self._send_request(method, url, body, headers, encode_chunked) 1253
~\anaconda3\lib\http\client.py in _send_request(self, method, url, body, headers, encode_chunked) 1297 body = _encode(body, 'body') -> 1298 self.endheaders(body, encode_chunked=encode_chunked) 1299
~\anaconda3\lib\http\client.py in endheaders(self, message_body, encode_chunked) 1246 raise CannotSendHeader() -> 1247 self._send_output(message_body, encode_chunked=encode_chunked) 1248
~\anaconda3\lib\http\client.py in _send_output(self, message_body, encode_chunked) 1025 del self._buffer[:] -> 1026 self.send(msg) 1027
~\anaconda3\lib\http\client.py in send(self, data) 965 if self.auto_open: --> 966 self.connect() 967 else:
~\anaconda3\lib\http\client.py in connect(self) 1413 -> 1414 super().connect() 1415
~\anaconda3\lib\http\client.py in connect(self) 937 self.sock = self._create_connection( --> 938 (self.host,self.port), self.timeout, self.source_address) 939 self.sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1)
~\anaconda3\lib\socket.py in create_connection(address, timeout, source_address) 706 err = None --> 707 for res in getaddrinfo(host, port, 0, SOCK_STREAM): 708 af, socktype, proto, canonname, sa = res
~\anaconda3\lib\socket.py in getaddrinfo(host, port, family, type, proto, flags) 751 addrlist = [] --> 752 for res in _socket.getaddrinfo(host, port, family, type, proto, flags): 753 af, socktype, proto, canonname, sa = res
gaierror: [Errno 11004] getaddrinfo failed
During handling of the above exception, another exception occurred:
URLError Traceback (most recent call last)
Can you copy the following link and paste into your web browser to see if you can read it? https://raw.githubusercontent.com/BlankerL/DXY-2019-nCoV-Data/master/csv/DXYArea.csv
If not, then probably you have a firewall or something else blocking the link. Can you access GitHub in general?
I can't read it in my browser,although i have aleady close my firewall.it's weird.I need to check my computer Settings.Thanks a lot!
您好,我已经‘’pip install utils‘’,并且显示成功 Requirement already satisfied: utils in d:\python\lib\site-packages (1.0.1)
但是我在python notebook中试图import utils的时候,仍然报错,请问怎么解决呢
ModuleNotFoundError Traceback (most recent call last)