The code shows following errors:
ACTION REQUIRED: Dependencies libstdc++-6.dll and libgcc_s_seh-1.dll not found.
Ensure user account has write permission to C:\Users\dungeon_master\Anaconda3\envs\gl-env\lib\site-packages\graphlab
Run graphlab.get_dependencies() to download and install them.
Restart Python and import graphlab again.
By running the above function, you agree to the following licenses.
when i try to write get_dependencies() afterwards it shows the errors shown in image
ContentTooShortError Traceback (most recent call last)
<ipython-input-4-9e64085fb919> in <module>()
----> 1 graphlab.get_dependencies()
C:\Users\dungeon_master\Anaconda3\envs\gl-env\lib\site-packages\graphlab\dependencies.pyc in get_dependencies()
39
40 print('Downloading gcc-libs.')
---> 41 (dllarchive_file, dllheaders) = urllib.urlretrieve('http://repo.msys2.org/mingw/x86_64/mingw-w64-x86_64-gcc-libs-5.1.0-1-any.pkg.tar.xz')
42 dllarchive_dir = tempfile.mkdtemp()
43
C:\Users\dungeon_master\Anaconda3\envs\gl-env\lib\urllib.pyc in urlretrieve(url, filename, reporthook, data, context)
96 else:
97 opener = _urlopener
---> 98 return opener.retrieve(url, filename, reporthook, data)
99 def urlcleanup():
100 if _urlopener:
C:\Users\dungeon_master\Anaconda3\envs\gl-env\lib\urllib.pyc in retrieve(self, url, filename, reporthook, data)
287 if size >= 0 and read < size:
288 raise ContentTooShortError("retrieval incomplete: got only %i out "
--> 289 "of %i bytes" % (read, size), result)
290
291 return result
ContentTooShortError: retrieval incomplete: got only 105704 out of 546800 bytes
Well, I faced the same questions 1 hour ago, and I fixed it now.
For the 2 .dll files, you can search the internet to download them, copy them to you directory:C:\Users\dungeon_master\Anaconda3\envs\gl-env\lib\site-packages\graphlab.
In ipython notebook, run import graphlab, and then run graphlab.get_dependencies(). Wait 1 minute, the base package will download.
After the 2 steps, you may restart you computer, then you will find everything back to normal.
The error exists for me as well after the following the above steps. What i realised is that the these two dependencies needs to be extracted in the "cython" folder inside "graphlab" folder. So i copied the same folder from a different installation that was working for me previously and volla.. "import graphlab" was successful. In case anyone needs it, below is the link to the zip of my "cython" folder. Just replace this "cython" folder inside graphlab (Usual location is '/Anaconda2/envs/gl-env/Lib/site-packages/graphlab'. I hope it helps someone
https://drive.google.com/open?id=0B1voSQs3jo7Jc2l6RTBzWGhYUUU
Related
I have try to study deep learning in colab with local runtime but after a few step I got the error
notice: I use windows 10
link: https://colab.research.google.com/drive/14-smojGNfo-Gr_voM9AfcMiuV9YvXWU1?hl=en
I've got error from this line:
show_random_elements(common_voice_train.remove_columns(["path"]), num_examples=20)
the error:
File C:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\datasets\features\audio.py:175, in Audio._decode_mp3(self, path_or_file)
174 import torchaudio.transforms as T
--> 175 torchaudio.set_audio_backend("sox_io")
176 except RuntimeError as err:
File C:\ProgramData\Anaconda3\envs\myenv\lib\site-packages\torchaudio\backend\utils.py:43, in set_audio_backend(backend)
42 if backend is not None and backend not in list_audio_backends():
---> 43 raise RuntimeError(
44 f'Backend "{backend}" is not one of '
45 f'available backends: {list_audio_backends()}.')
47 if backend is None:
To support decoding 'mp3' audio files, please install 'sox'.
it seem I need to install sox but I already installed it. the windows cant use sox to decode so I also install soundfile but the problem still be there
I would like to check the number if issues in a given sentence.
my code is
import language_tool_python
tl = language_tool_python.LanguageTool('en-US')
txt = "good mooorning sirr and medam my namee anderen i am from amerecia !"
m = tl.check(txt)
len(m)
Instead of returning the number i am getting error message as shown below.
ModuleNotFoundError Traceback (most recent call last)
<ipython-input-1-1c4c9134d6f4> in <module>
1 import language_tool_python
----> 2 tool = language_tool_python.LanguageTool('en-US')
3
4 text = "Your the best but their are allso good !"
5 matches = tool.check(text)
E:\Anaconda\lib\site-packages\language_tool_python\server.py in __init__(self, language, motherTongue, remote_server, newSpellings, new_spellings_persist)
43 self._update_remote_server_config(self._url)
44 elif not self._server_is_alive():
---> 45 self._start_server_on_free_port()
46 if language is None:
47 try:
E:\Anaconda\lib\site-packages\language_tool_python\server.py in _start_server_on_free_port(self)
212 self._url = 'http://{}:{}/v2/'.format(self._HOST, self._port)
213 try:
--> 214 self._start_local_server()
215 break
216 except ServerError:
E:\Anaconda\lib\site-packages\language_tool_python\server.py in _start_local_server(self)
222 def _start_local_server(self):
223 # Before starting local server, download language tool if needed.
--> 224 download_lt()
225 err = None
226 try:
E:\Anaconda\lib\site-packages\language_tool_python\download_lt.py in download_lt(update)
142 ]
143
--> 144 confirm_java_compatibility()
145 version = LATEST_VERSION
146 filename = FILENAME.format(version=version)
E:\Anaconda\lib\site-packages\language_tool_python\download_lt.py in confirm_java_compatibility()
73 # found because of a PATHEXT-related issue
74 # (https://bugs.python.org/issue2200).
---> 75 raise ModuleNotFoundError('No java install detected. Please install java to use language-tool-python.')
76
77 output = subprocess.check_output([java_path, '-version'],
ModuleNotFoundError: No java install detected. Please install java to use language-tool-python.
When I run the code I get no java install detected
How to solve this issue?
I think this is not an issue with the Code itself when I run the code you provided
import language_tool_python
tl = language_tool_python.LanguageTool('en-US')
txt = "good mooorning sirr and medam my namee anderen i am from amerecia !"
m = tl.check(txt)
len(m)
I get as result a number in this case
OUT: 8
In the Documentation of the language-tool-python is written:
By default, language_tool_python will download a LanguageTool server .jar and run that in the background to detect grammar errors locally. However, LanguageTool also offers a Public HTTP Proofreading API that is supported as well. Follow the link for rate-limiting details. (Running locally won't have the same restrictions.)
So You will need Java (JRE and SKD). Also it's Written in the Requirements of the library:
Prerequisites
Python 3.5+
LanguageTool (Java 8.0 or higher)
The installation process should take care of downloading LanguageTool (it may take a few minutes). Otherwise, you can manually download LanguageTool-stable.zip and unzip it into where the language_tool_python package resides.
Source:
https://pypi.org/project/language-tool-python/
Python 2.7 - JavaError when using grammar-check 1.3.1 library
I Hope I could help.
OSError: No command "N4BiasFieldCorrection" found on host pc. Please check that the corresponding package is installed.
i have problem using nipype.can you plese help?
from nipype.interfaces.ants import N4BiasFieldCorrection
n4 = N4BiasFieldCorrection()
n4.inputs.dimension = 3
n4.inputs.input_image =('/home/abhayadev/Desktop/project/Dataset/BRATS2013_CHALLENGE/Challenge/HG/0301/VSD.Brain.XX.O.MR_Flair/VSD.Brain.XX.O.MR_Flair.17572.mha')
n4.inputs.n_iterations = [20, 20, 10, 5]
n4.run()
res=n4.run()
print(res)
output
:
``OSError Traceback (most recent call last)
<ipython-input-10-49ae4ec58583> in <module>
5 n4.inputs.input_image =`enter code here`('/home/abhayadev/Desktop/project/Dataset/BRATS2013_CHALLENGE/Challenge/HG/0301/VSD.Brain.XX.O.MR_Flair/VSD.Brain.XX.O.MR_Flair.17572.mha')
6 n4.inputs.n_iterations = [20, 20, 10, 5]
----> 7 n4.run()
8 res=n4.run()
9 print(res)
~/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py in run(self, cwd, ignore_exception, **inputs)
374 try:
375 runtime = self._pre_run_hook(runtime)
--> 376 runtime = self._run_interface(runtime)
377 runtime = self._post_run_hook(runtime)
378 outputs = self.aggregate_outputs(runtime)
~/anaconda3/lib/python3.7/site-packages/nipype/interfaces/base/core.py in _run_interface(self, runtime, correct_return_codes)
750 'No command "%s" found on host %s. Please check that the '
751 'corresponding package is installed.' % (executable_name,
--> 752 runtime.hostname))
753
754 runtime.command_path = cmd_path
OSError: No command "N4BiasFieldCorrection" found on host abhayadev. Please check that the corresponding package is installed.
You need to have ANTS's install directory in your PATH variable.
From the install guide:
Assuming your install prefix was /opt/ANTs, there will now be a binary directory /opt/ANTs/bin, containing the ANTs executables and scripts. The scripts additionally require ANTSPATH to point to the bin directory including a trailing slash.
For the bash shell (default on Mac and some Linux), you need to set
export ANTSPATH=/opt/ANTs/bin/
export PATH=${ANTSPATH}:$PATH
If you use nipype within neurodocker (would recommend) you have to:
source activate neuro to have the ANTS command available.
I received a ipython notebook file with the following code and I'm attempting to execute it via Jupyter.
import docx;
from django.utils.encoding import smart_text;
doc = docx.Document('test_file.docx')
I get the following traceback
---------------------------------------------------------------------------
PackageNotFoundError Traceback (most recent call last)
<ipython-input-8-2ff3b55810a7> in <module>()
1 import docx;
2 from django.utils.encoding import smart_text;
----> 3 doc = docx.Document('test_file.docx')
4 statements = [para.text.strip() for para in doc.paragraphs
5 if para.text.strip() != '']
C:\Program Files (x86)\Anaconda2\lib\site-packages\docx\api.pyc in Document(docx)
23 """
24 docx = _default_docx_path() if docx is None else docx
---> 25 document_part = Package.open(docx).main_document_part
26 if document_part.content_type != CT.WML_DOCUMENT_MAIN:
27 tmpl = "file '%s' is not a Word file, content type is '%s'"
C:\Program Files (x86)\Anaconda2\lib\site-packages\docx\opc\package.pyc in open(cls, pkg_file)
114 *pkg_file*.
115 """
--> 116 pkg_reader = PackageReader.from_file(pkg_file)
117 package = cls()
118 Unmarshaller.unmarshal(pkg_reader, package, PartFactory)
C:\Program Files (x86)\Anaconda2\lib\site-packages\docx\opc\pkgreader.pyc in from_file(pkg_file)
30 Return a |PackageReader| instance loaded with contents of *pkg_file*.
31 """
---> 32 phys_reader = PhysPkgReader(pkg_file)
33 content_types = _ContentTypeMap.from_xml(phys_reader.content_types_xml)
34 pkg_srels = PackageReader._srels_for(phys_reader, PACKAGE_URI)
C:\Program Files (x86)\Anaconda2\lib\site-packages\docx\opc\phys_pkg.pyc in __new__(cls, pkg_file)
29 else:
30 raise PackageNotFoundError(
---> 31 "Package not found at '%s'" % pkg_file
32 )
33 else: # assume it's a stream and pass it to Zip reader to sort out
PackageNotFoundError: Package not found at 'test_file.docx'
I uninstalled docx and reinstalled python-docx recently and wondering if that's related, or is this a separate issue?
This means that the specified file ('test_file.docx') does not exist or is not a Word document.
Check that the path is correct and that you can open the document with Word (or LibreOffice or whatever).
You might be missing a path part of the filename. Sometimes it's tricky to know what Python considers the default directory, which is where it goes looking for a filename without a path.
Any ideas?
In [1]: from selenium.firefox.webdriver import WebDriver
In [2]: d=WebDriver()
---------------------------------------------------------------------------
Exception Traceback (most recent call last)
/usr/local/selenium-read-only/<ipython console> in <module>()
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/selenium-2.0_dev-py2.6.egg/selenium/firefox/webdriver.pyc in __init__(self, profile, timeout)
48 profile = FirefoxProfile(name=profile)
49 if not profile:
---> 50 profile = FirefoxProfile()
51 self.browser.launch_browser(profile)
52 RemoteWebDriver.__init__(self,
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/selenium-2.0_dev-py2.6.egg/selenium/firefox/firefox_profile.pyc in __init__(self, name, port, template_profile, extension_path)
72
73 if name == ANONYMOUS_PROFILE_NAME:
---> 74 self._create_anonymous_profile(template_profile)
75 self._refresh_ini()
76 else:
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/selenium-2.0_dev-py2.6.egg/selenium/firefox/firefox_profile.pyc in _create_anonymous_profile(self, template_profile)
82 self._copy_profile_source(template_profile)
83 self._update_user_preference()
---> 84 self.add_extension(extension_zip_path=self.extension_path)
85 self._launch_in_silent()
86
/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages/selenium-2.0_dev-py2.6.egg/selenium/firefox/firefox_profile.pyc in add_extension(self, force_create, extension_zip_path)
152 not os.path.exists(extension_source_path)):
153 raise Exception(
--> 154 "No extension found at %s" % extension_source_path)
155
156 logging.debug("extension_source_path : %s" % extension_source_path)
Exception: No extension found at None
Okay, I've gotten past this Exception by manually creating the webdriver-extension.zip file and copying it to the selenium/firefox folder in my site-packages directory.
Everything that follows assumes you have gotten a copy of the source code from http://selenium.googlecode.com/svn/trunk/ (using subversion/svn)
If you have Ruby installed you might be able to run rake firefox (that's Ruby make), which is the way you are supposed to build the zip file. Since I don't have ruby installed, I just looked at the /Rakefile and figured out what was supposed to be in the zip.
Basically you just need to add everything in the /firefox/src/extension/ folder. On windows I added the /firefox/prebuilt/Win32/Release/webdriver-firefox.dll to it as well, but I'm not sure I needed to. (On linux you may need to add the appropriate .so file).
OK, I solved it by discovering that the virtualenv was I installed via macports was "missing",
sudo ln -s `which virtualenv-2.6` /opt/local/bin/virtualenv
then running rake firefox and finally rake firefox_xpi ...
what is the following code doing?
from selenium.firefox.webdriver import WebDriver
d = WebDriver()
a proper webdriver import and firefox instantiation looks like this:
from selenium import webdriver
d = webdriver.Firefox()