diff --git a/packages/hxtorch/package.py b/packages/hxtorch/package.py
index fdaf01a568235023637755758464b16c7c40c4f7..6b36a3685216db881fcea689cf567f2159e8539d 100644
--- a/packages/hxtorch/package.py
+++ b/packages/hxtorch/package.py
@@ -5,7 +5,6 @@
 import os
 
 from spack import *
-from spack.pkg.builtin.boost import Boost
 
 
 class Hxtorch(WafPackage):
@@ -75,7 +74,7 @@ class Hxtorch(WafPackage):
                 include_dirs -= include_exclude_dirs
                 print('headers (', dep.name, '):', include_dirs, "\n")
                 include.extend(list(include_dirs))
-            except error.NoHeadersError:
+            except spack.error.NoHeadersError:
                 # we don't care if no header directories are found
                 pass
 
@@ -88,7 +87,7 @@ class Hxtorch(WafPackage):
                 library_dirs -= library_exclude_dirs
                 print('libs (', dep.name, '):', library_dirs, "\n")
                 library.extend(list(library_dirs))
-            except error.NoLibrariesError:
+            except spack.error.NoLibrariesError:
                 # we don't care if no library directories are found
                 pass