microsoft / sqlmlutils

Utility functions for easier usage of SQL Server Machine Learning Services
Other
32 stars 33 forks source link

error to install new package #65

Open tiagobalabuch opened 4 years ago

tiagobalabuch commented 4 years ago

I am using Azure Data Studio and when I run the command: sqlmlutils.SQLPackageManager(connection).install("text-tools") I got the error below. My python version is 3.8.2

RuntimeError Traceback (most recent call last)

in 1 import sqlmlutils 2 connection = sqlmlutils.ConnectionInfo(server="myserver", database="mydatabase", uid="myuser", pwd="mypass") ----> 3 sqlmlutils.SQLPackageManager(connection).install("text-tools") ~\AppData\Roaming\Python\Python36\site-packages\sqlmlutils\packagemanagement\sqlpackagemanager.py in install(self, package, upgrade, version, install_dependencies, scope, out_file) 70 self._install_from_file(package, scope, upgrade, out_file=out_file) 71 else: ---> 72 self._install_from_pypi(package, upgrade, version, install_dependencies, scope, out_file=out_file) 73 74 def uninstall(self, ~\AppData\Roaming\Python\Python36\site-packages\sqlmlutils\packagemanagement\sqlpackagemanager.py in _install_from_pypi(self, target_package, upgrade, version, install_dependencies, scope, out_file) 148 with tempfile.TemporaryDirectory() as temporary_directory: 149 pipdownloader = PipDownloader(self._connection_info, temporary_directory, target_package) --> 150 target_package_file = pipdownloader.download_single() 151 self._install_from_file(target_package_file, scope, upgrade, out_file=out_file) 152 ~\AppData\Roaming\Python\Python36\site-packages\sqlmlutils\packagemanagement\pipdownloader.py in download_single(self) 24 25 def download_single(self) -> str: ---> 26 _, pkgsdownloaded = self._download(False) 27 return pkgsdownloaded[0] 28 ~\AppData\Roaming\Python\Python36\site-packages\sqlmlutils\packagemanagement\pipdownloader.py in _download(self, withdependencies) 42 43 if len(packagesdownloaded) <= 0: ---> 44 raise RuntimeError("Failed to download any packages, pip returned error: " + error) 45 46 return pkgreqs, packagesdownloaded RuntimeError: Failed to download any packages, pip returned error: ERROR: Exception: Traceback (most recent call last): File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\cli\base_command.py", line 153, in _main status = self.run(options, args) File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\commands\download.py", line 144, in run resolver.resolve(requirement_set) File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\legacy_resolve.py", line 201, in resolve self._resolve_one(requirement_set, req) File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\legacy_resolve.py", line 365, in _resolve_one abstract_dist = self._get_abstract_dist_for(req_to_install) File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\legacy_resolve.py", line 311, in _get_abstract_dist_for req.populate_link(self.finder, upgrade_allowed, self.require_hashes) File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\req\req_install.py", line 225, in populate_link self.link = finder.find_requirement(self, upgrade) File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\index.py", line 879, in find_requirement req.name, specifier=req.specifier, hashes=hashes, File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\index.py", line 861, in find_best_candidate candidates = self.find_all_candidates(project_name) File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\index.py", line 806, in find_all_candidates links=page_links, File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\index.py", line 775, in evaluate_links candidate = self.get_install_candidate(link_evaluator, link) File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\index.py", line 754, in get_install_candidate is_candidate, result = link_evaluator.evaluate_link(link) File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\index.py", line 193, in evaluate_link supported_tags = self._target_python.get_tags() File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\models\target_python.py", line 102, in get_tags impl=self.implementation, File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\pep425tags.py", line 406, in get_supported if is_manylinux2014_compatible(): File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\pep425tags.py", line 252, in is_manylinux2014_compatible return pip._internal.utils.glibc.have_compatible_glibc(2, 17) File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\utils\glibc.py", line 89, in have_compatible_glibc version_str = glibc_version_string() File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\utils\glibc.py", line 19, in glibc_version_string return glibc_version_string_confstr() or glibc_version_string_ctypes() File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\site-packages\pip\_internal\utils\glibc.py", line 51, in glibc_version_string_ctypes process_namespace = ctypes.CDLL(None) File "c:\users\user0123\azuredatastudio-python\0.0.1\lib\ctypes\__init__.py", line 348, in __init__ self._handle = _dlopen(self._name, mode) TypeError: LoadLibrary() argument 1 must be str, not None