Error when import qsharp
Describe the bug
When I run import qsharp I get the following error:
Preparing Q# environment...
..Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
...........Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
......Q# environment was not available in allocated time.
Please check the instructions at https://aka.ms/qdk-install/python.
Traceback (most recent call last):
File "C:\Users\xxxx\Documents\Projects\q-sharp-pythontest\host.py", line 1, in <module>
import qsharp
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\qsharp\__init__.py", line 198, in <module>
client = _start_client()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\qsharp\clients\__init__.py", line 67, in _start_client
raise IQSharpNotAvailableError(message)
qsharp.clients.IQSharpNotAvailableError: Q# environment was not available in allocated time.
Please check the instructions at https://aka.ms/qdk-install/python.
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x0000022710381B80>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
PS C:\Users\xxxx\Documents\Projects\q-sharp-pythontest> python .\host.py
Preparing Q# environment...
..Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
...........Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
......Q# environment was not available in allocated time.
Please check the instructions at https://aka.ms/qdk-install/python.
Traceback (most recent call last):
File "C:\Users\xxxx\Documents\Projects\q-sharp-pythontest\host.py", line 1, in <module>
import qsharp
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\qsharp\__init__.py", line 198, in <module>
client = _start_client()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\qsharp\clients\__init__.py", line 67, in _start_client
raise IQSharpNotAvailableError(message)
qsharp.clients.IQSharpNotAvailableError: Q# environment was not available in allocated time.
Please check the instructions at https://aka.ms/qdk-install/python.
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
Exception ignored in: <function Socket.__del__ at 0x000002271BC9FC10>
Traceback (most recent call last):
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\sugar\socket.py", line 67, in __del__
self.close()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\_future.py", line 160, in close
self._clear_io_state()
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\site-packages\zmq\asyncio\__init__.py", line 60, in _clear_io_state
self.io_loop.remove_reader(self._fd)
File "C:\Users\xxxx\AppData\Local\Programs\Python\Python39\lib\asyncio\events.py", line 507, in remove_reader
raise NotImplementedError
NotImplementedError:
To Reproduce My config:
- Fresh Windows 11 install
- VSCode
- Python 3.9.8
- Installed
qsharpwithpip install qsharp - Dotnet 3.1
- install Q# SDK with:
-
dotnet tool install -g Microsoft.Quantum.IQSharpverison: 0.20.2110171573 -
dotnet iqsharp install
-
- Run the following
host.py:
import qsharp
Expected behavior Q# is installed correctly, when I run Q# programs from the command line it works fine.
It looks like the issue was resolved when installing Python 3.7.3. I'm wondering if this is a regression. Our docs mention that the QDK is compatible with Python>3.6.
@guenp: Based on the above, I don't think this is a regression, no, but an upstream bug that we may be affected by.
@vivanwin: Thanks for filing, would you be willing to share what versions of pyzmq and jupyter_client you're running? The output of pip list and/or conda list may be helpful in diagnosing this issue. Thanks!
@cgranade, sure no problem. To be honest I did downgrade to Python 3.7.3 which resolved the problem, so I am not sure of the output below is still useful.
Pip output:
anyio 3.3.4
asgiref 3.4.1
click 8.0.3
colorama 0.4.4
entrypoints 0.3
fastapi 0.70.0
h11 0.12.0
idna 3.3
importlib-metadata 4.8.2
jupyter-client 7.0.6
jupyter-core 4.9.1
nest-asyncio 1.5.1
pip 21.3.1
pydantic 1.8.2
python-dateutil 2.8.2
pywin32 302
pyzmq 19.0.2
qsharp 0.20.2110.171573
qsharp-chemistry 0.20.2110.171573
qsharp-core 0.20.2110.171573
setuptools 40.8.0
six 1.16.0
sniffio 1.2.0
starlette 0.16.0
tornado 6.1
traitlets 5.1.1
typing_extensions 4.0.0
uvicorn 0.15.0
zipp 3.6.0
If you need more info let me know
Thanks for the help, @vivanwin! It's interesting that it works with the latest jupyter-client (7.0.6) on Python 3.7.3 but not 3.9.8. Trying locally on my machine with 3.9.7 (the latest 3.9.8 patch isn't available via anaconda.org yet), I was unable to reproduce the issue either jupyter-client==7.0.1 or 7.0.6. If you have any more details that you can provide to help us nail this down, I'd greatly appreciate it. Thanks for your help! ♥
➜ pip list
Package Version
-------------------- ----------------
argon2-cffi 20.1.0
async-generator 1.10
attrs 21.2.0
azure-quantum 0.20.2110.171573
backcall 0.2.0
bleach 4.0.0
certifi 2021.10.8
cffi 1.15.0
colorama 0.4.4
debugpy 1.4.1
decorator 5.1.0
defusedxml 0.7.1
entrypoints 0.3
importlib-metadata 4.8.1
ipykernel 6.4.1
ipython 7.29.0
ipython-genutils 0.2.0
jedi 0.18.0
Jinja2 3.0.2
jsonschema 3.2.0
jupyter-client 7.0.1
jupyter-core 4.9.1
jupyterlab-pygments 0.1.2
MarkupSafe 2.0.1
matplotlib-inline 0.1.2
mistune 0.8.4
nbclient 0.5.3
nbconvert 6.1.0
nbformat 5.1.3
nest-asyncio 1.5.1
notebook 6.4.5
packaging 21.0
pandocfilters 1.4.3
parso 0.8.2
pickleshare 0.7.5
pip 21.2.4
prometheus-client 0.11.0
prompt-toolkit 3.0.20
pycparser 2.21
Pygments 2.10.0
pyparsing 3.0.4
pyrsistent 0.18.0
python-dateutil 2.8.2
pywin32 228
pywinpty 0.5.7
pyzmq 22.2.1
qdk 0.20.2110.171573
qdk-sim-experimental 0.20.2110.171573
qsharp 0.20.2110.171573
qsharp-chemistry 0.20.2110.171573
qsharp-core 0.20.2110.171573
Send2Trash 1.8.0
setuptools 58.0.4
six 1.16.0
terminado 0.9.4
testpath 0.5.0
tornado 6.1
traitlets 5.1.1
wcwidth 0.2.5
webencodings 0.5.1
wheel 0.37.0
wincertstore 0.2
zipp 3.6.0
I actually just ran into the same issue with python 3.8.10 and Windows 10, but most everything else looks about the same. I would guess that a regression has happened.
C:\Users\alyss>python --version
Python 3.8.10
C:\Users\alyss>pip list
Package Version
-------------------- ----------------
appdirs 1.4.4
argon2-cffi 21.3.0
argon2-cffi-bindings 21.2.0
asgiref 3.2.10
attrs 21.4.0
backcall 0.2.0
beautifulsoup4 4.9.3
bleach 4.1.0
certifi 2020.6.20
cffi 1.15.0
chardet 3.0.4
click 7.1.2
colorama 0.4.4
DateTime 4.3
debugpy 1.5.1
decorator 5.1.0
defusedxml 0.7.1
distlib 0.3.1
Django 3.1
django-cors-headers 3.5.0
django-filter 2.3.0
djangorestframework 3.11.1
entrypoints 0.3
filelock 3.0.12
idna 2.10
importlib-resources 5.4.0
ipykernel 6.6.0
ipython 7.30.1
ipython-genutils 0.2.0
ipywidgets 7.6.5
jedi 0.18.1
Jinja2 3.0.3
jsonschema 4.3.2
jupyter 1.0.0
jupyter-client 7.1.0
jupyter-console 6.4.0
jupyter-core 4.9.1
jupyterlab-pygments 0.1.2
jupyterlab-widgets 1.0.2
MarkupSafe 2.0.1
matplotlib-inline 0.1.3
mistune 0.8.4
nbclient 0.5.9
nbconvert 6.3.0
nbformat 5.1.3
nest-asyncio 1.5.4
notebook 6.4.6
packaging 21.3
pandocfilters 1.5.0
parso 0.8.3
pickleshare 0.7.5
prometheus-client 0.12.0
prompt-toolkit 3.0.24
psycopg2 2.8.5
pycparser 2.21
pyenv-win 2.64.11
Pygments 2.11.1
pyparsing 3.0.6
pyrsistent 0.18.0
python-dateutil 2.8.1
pytz 2020.1
pywin32 303
pywinpty 1.1.6
pyzmq 19.0.2
qsharp 0.21.2112.180703
qsharp-chemistry 0.21.2112.180703
qsharp-core 0.21.2112.180703
qtconsole 5.2.2
QtPy 2.0.0
requests 2.24.0
Send2Trash 1.8.0
six 1.15.0
soupsieve 2.1
sqlparse 0.3.1
terminado 0.12.1
testpath 0.5.0
tornado 6.1
traitlets 5.1.1
urllib3 1.25.10
virtualenv 20.0.31
wcwidth 0.2.5
webencodings 0.5.1
widgetsnbextension 3.5.2
zipp 3.7.0
zope.interface 5.1.0
C:\Users\alyss>jupyter --version
Selected Jupyter core packages...
IPython : 7.30.1
ipykernel : 6.6.0
ipywidgets : 7.6.5
jupyter_client : 7.1.0
jupyter_core : 4.9.1
jupyter_server : not installed
jupyterlab : not installed
nbclient : 0.5.9
nbconvert : 6.3.0
nbformat : 5.1.3
notebook : 6.4.6
qtconsole : 5.2.2
traitlets : 5.1.1
Looks like the same issue as #512 .
Thank you for reporting this! It should be fixed now with #685, but please feel free to reopen if you're still experiencing this bug.