Error when import qsharp
See original GitHub issueDescribe 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
qsharp
withpip install qsharp
- Dotnet 3.1
- install Q# SDK with:
dotnet tool install -g Microsoft.Quantum.IQSharp
verison: 0.20.2110171573dotnet 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.
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (4 by maintainers)
Top Results From Across the Web
import qsharp ModuleNotFoundError: No module named ' ...
I install the python library named Python.NET package using pip install pythonnet, clr module is installed and imported, installation of qsharp ...
Read more >Fail when import qsharp in python · Issue #355
Describe the bug. After conda installation, run % python -c "import qsharp" , Returns the following error message: Preparing Q# environment.
Read more >Cannot import namespace from a Q# file to run it in ...
It seems like you're getting a python error trying to do a relative import, not necessarily a qsharp error. To do a relative...
Read more >Ways to run a Q# program - Azure Quantum
To load external packages containing Q# code, use the qsharp. packages API. If the Q# code in the current folder depends on external...
Read more >qsharp
The qsharp package for Python provides interoperability with the Quantum Development Kit and with the Q# language, making it easy to simulate Q#...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
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.