I am unable to complete the nltk package download. It always stops at the items omw (Open Multilingual Wordnet). These are the only two remaining ones. I have looked at other help items (i.e. install ntlk supporting packages or error installing Nltk) but the problem persists. It returns the error code 11001, i.e. wrong server location. But the server index http://ntlk.org/nltk_data/ worked for all other items. I am a bit lost here.
Print scree of error message can be found here
I use python 3.5 and have the latest nltk file (downloaded and unzipped it last night)
Many thanks!
Are you connecting to the internet with a proxy server? If so, try this:
nltk.set_proxy('http://proxy.example.com:3128', ('USERNAME', 'PASSWORD'))
nltk.download()
Alternatively, try this:
Open a terminal window (Use the “Run...” option on the Start menu). Go to the directory where Python is installed, for example C:\Program Files\Python 3.5\
type:
python -m nltk.downloader all
If all that fails, you should try downloading the data manually from here: http://www.nltk.org/nltk_data/ and then put your data in the C:\nltk_data directory.
Related
I am trying to use nltk and I need to download the nltk.download() data. I have tried a number of things on my work computer, but I'm not sure if it's our firewall, or if there is something else going on. I am doing this in Jupyter Notebook.
I have tried running the following code (nltk.download()) and updating the the directory and server as shown below, but I still get an error. Which server index should I be using?
I've also tried simply running an import statement followed by a download statement. Do we still need to do this to use stopwords?
import nltk
nltk.download('stopwords')
I've tried going through Anaconda Prompt and running the code below and I still get the same error.
python -m nltk.downloader all
Lastly, I've tried going directly to the site (http://nltk.org/nltk_data/)to download the data and the website never opens and times out.
Can anyone help direct me on how to fix this? I've seen something written on a proxy server. If that is the issue, how do I get around it?
I am working one file python project.
I integrated google-cloud-API for realtime speech streaming and recognition.
It works with python aaa.py command well.
Now I need windows build file(.exe), so I used pyinstaller program and I got aaa.exe file successfully.
But I got this error while running speech streaming by using Google cloud API.
[Errno 2] No such file or directory:
'D:\AI\ai\dist\AAA\google\cloud\gapic\speech\v1\speech_client_config.json'
So I copied this speech_client_config.json file in needed path, after that I got below error again.
Exception in 'grpc._cython.cygrpc.ssl_roots_override_callback'
ignored E0511 01:13:14.320000000 3108
src/core/lib/security/security_connector/security _connector.cc:1170]
assertion failed: pem_root_certs != nullptr
Then, I can not find solution to get working version with google-cloud API.
I am using python version 2.7.14
I need your friendly help.
Thanks.
I had the same problem. If you are willing to distribute roots.pem with your executable (just search for the file - it should be buried deep within the installation directory of grpcio), I had luck fixing this by setting GRPC_DEFAULT_SSL_ROOTS_FILE_PATH environment variable to the full path of this roots.pem file.
Update 2021
To anyone who is experiencing this issue. I got it working thanks to these amazing people. See the full conversation on this github issue.
Here is the link
Step 1
Credits to #cbenhagen & #rising-stark on this github link.
A PyInstaller hook called hook-grpc.py looking like this would do the trick:
Create a python file named hook-grpc.py with this code.
from PyInstaller.utils.hooks import collect_data_files
datas = collect_data_files('grpc')
Step 2
Put the hook-grpc.py file in your \site-packages\PyInstaller\hooks directory of the python environment you are running on. So basically you can find it at
C:\Users\yourusername\AppData\Local\Programs\Python\Python37\Lib\site-packages\PyInstaller\hooks
Note:
Just change the yourusername and Python37 to your
respective username and python version you are using.
For Anaconda users it might be different. Check this site
to find the anaconda python environment path you are using.
Step 3
Once you've done that you can now convert your .py python program to .exe using pyinstaller and it should work.
This looks to me like a SSL credentials mistake. I think you are not being allowed to GC. Check this code snippet and this documentation.
im trying to install a python library for some software I just downloaded, and I'm getting this error when I run the library install from the command line. The error occures when it hits this point
INFO 2015-02-14 13:47:20, 467 Main Thread _7ZipController.unzip.13 running:C:\users\desktop\BBOS\tools\7-Zip\7za.exe x -y -oC:\user\desktop\BBOS\New Folderr\Lib\Site-package C:\user\Desktop\BBOS\New Folder\Lib\Site-Packages\pymysql.7z
I'm not real familiar with python, so forgive me if this isn't enough information. If you need more info, i can try and provide as much as possible!
EDIT:
the software im trying to install is called "baseball on a stick" its a software package that extracts files from MLB.com and then places them into a MySQL database. This error occurs when I try and install the "installPythonLibs.py" file that comes with the software. If you need to know more about the software, you can google "Baseball on a stick" and it should be one of the first links to SourceForge. There is a video on there as well that shows exactly what i'm trying to do, but for some reason it doesn't work when I try and do it. Hopefully this is enough extra information. here is the link to the software and video https://sourceforge.net/projects/baseballonastic/
Thanks in advance
The reason for your error is that you have a path component with a space in its name.
C:\user\Desktop\BBOS\New Folder\Lib\Site-Packages\pymysql.7z
^^^^^^^^^^
The bigger problem is that this is not how you install Python packages; you just need to run:
pip install pymysql
From a command prompt (ie, from cmd.exe).
I'm new to Hbase and I would like to comunicate with it throught a python API which works with Thrift. I've followed this tutorial in order to install it properly on my machine, everything seemed to worked fine then I generated a .thrift file with the following command:
wget http://svn.apache.org/viewvc/hbase/trunk/hbase-thrift/src/main/resources/org/apache/hadoop/hbase/thrift/Hbase.thrift\?view\=markup
-O hbase.thrift
Then I tried to generate my client like it's showed here but i get the following error message:
[ERROR:/home/tests/hbase/hbase.thrift:12] (last token was '<')
syntax error
[FAILURE:/home/tests/hbase/hbase.thrift:12] Parser error during include pass.
I tried to lookup on internet what was the cause of this error and found this paper, I tried to lookup in thriftl.ll to see if I could correct the error but I found that the correction was already present in the file.
What can I do more in order to make this work ?
Thank you !
EDIT:
I'm using thrift 0.9.0
Using a fairly recent Thrift version and more importantly the proper URL I was able to generate Python sources without errors.
Please check if your download is actually a Thrift file or if it is a HTML source. The error message sounds very much like that, since HTML pages typically start with an <, and the right Thrift file contains the first < at line 110 (within list<Mutation>), not around line 12.
PS: Why are you using such an old version? 0.9.1 was released a year ago and 0.9.2 is actually in the process of being released.
PPS: Actually, the referenced ticket THRIFT-1274 seems not have much to do with it. But maybe I'm overlooking something.
Context
Steps taken:
Environment Setup
I've installed protobufs via Home Brew
I've also followed the steps in the proto-bufs python folder's readme on installing python protobufs - namely running the python setup.py install command
I've using the protobuf-2.4.1 files
Coding
I have a python file (generated from a .proto file I compiled) that contains the statement, among other import statements, but I believe this one is the one causing issues:
from google.protobuf import descriptor_pb2
The above python file, I'm importing in another python file, it's
this python file that I want to write up logic for parsing the
protobufs data files I receive
Error received
I get this error when running that file:
Steps taken to fix
Searched google for that error - didn't find much
Looked at this question/answer Why do I see "cannot import name descriptor_pb2" error when using Google Protocol Buffers?
I don't really understand the above questions selected answer,I tried to run the command in the above answer protoc descriptor.proto --python_out=gen/ by coping and pasting it in the terminal in different places but couldn't get it to work
Question
How do I fix this error?
What is the underlying cause?
How do I check if the rest of my protobuf python compiler/classes are set up correctly?
I've discovered the issue. I had not run the python install instructions the first time I tried to compile this file. I recompiled the file and this issue was fixed.