Closed ClaudeCoulombe closed 6 years ago
@ClaudeCoulombe try this in your terminal
python -m spacy download en
does that work?
Yess, it works! Thanks for your pretty fast answer!
I've tried with pip3 install https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-2.0.0/en_core_web_sm-2.0.0.tar.gz --no-deps
with no success.
But python -m spacy download en
works well. For the moment, I'm waiting after the preprocessing which seems to be long and memory consuming. I'm better to switch to cloud... I think...
I'll close the issue.
Hi, your solution (python -m spacy download en) worked perfectly, but it says download successfull but linking failed! can you please help me.
Hi , Its giving me the same issue, after downloading it says linking failed
Hi, this got resolved when i opened the cmd prompt as an Administrator, kindly open anaconda as an admin and then run the same commands, it should work.
I am logged in through the Admin account, but it still getting the linking error.
Thanks,
@ClaudeCoulombe try this in your terminal
python -m spacy download en
does that work?
Thanks,it works for me.
Thanks,
@ClaudeCoulombe try this in your terminal
python -m spacy download en
does that work?
Thanks,it works for me.
No it says it can't link
Hi,it have showed linking successfully, but when I print 'nlp = spacy.load('en')' in prompt,it doesn't work ..
python -m spacy download en shows /usr/bin/python: No module named spacy
@koliko are you running this code inside the provided docker container? if not, looks like you do not have spacy installed, so you will have to first install spacy
pip install spacy
Good evening sir, I am beginner to spacy.. i installed spacy successfully and en module too. but when am load the en module the following error came.
import spacy nlp=spacy.load('en') txt=nlp("hello world") print(txt)
error: OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
Maybe an answer to many people.
python -m spacy download en
works only if you have administration rights, the installation folder should have admin rights
For those using Anaconda I found the following solution to install the en package and link it succesully:
python -m spacy download en
It worked for me
when i try ...it shows the following error sir... Creating a shortcut link for 'en' didn't work (maybe you don't have admin permissions?), but you can still load the model via its full package name: nlp = spacy.load('{name}') Download successful but linking failed
On Fri, Mar 8, 2019 at 11:30 PM Largo notifications@github.com wrote:
For those using Anaconda I found the following solution to install the en package and link it succesully:
- Right clik on the Anaconda Promt Icon
- Go to "More" and click on "Open as Administrator"
- Then type: python -m spacy download en
It worked for me
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/hamelsmu/Seq2Seq_Tutorial/issues/1#issuecomment-471019755, or mute the thread https://github.com/notifications/unsubscribe-auth/AuDQRsOsK-LefAomqSxczJ2P1zGtd8gTks5vUqVZgaJpZM4RmG5F .
-- Thanks and Regards
B Venkateswarlu, Department of Computer Science, Central University of Tamilnadu.
@venkey143228
Maybe you should use sudo python -m spacy download en
on linux.
Or you should use administrator cmd to run python -m spacy download en
on windows.
@venkey143228
@AnujaySaraf
@theSaumya
same issue with me, but for some reasons when I do spacy.load('en_core_web_sm')
it does work...
Yes ...for me too its working
On Thu, Mar 21, 2019 at 10:03 PM Julomoppet notifications@github.com wrote:
@venkey143228 https://github.com/venkey143228 @AnujaySaraf https://github.com/AnujaySaraf @theSaumya https://github.com/theSaumya same issue with me, but for some reasons when I do spacy.load('en_core_web_sm') it does work...
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hamelsmu/Seq2Seq_Tutorial/issues/1#issuecomment-475305262, or mute the thread https://github.com/notifications/unsubscribe-auth/AuDQRoD2T29Ym3bpQuePNgwOm9c8iO9fks5vY7RTgaJpZM4RmG5F .
-- Thanks and Regards
B Venkateswarlu, MSc Computer Science, Central University of Tamilnadu Thiruvarur. 610005
I did all this Right clik on the Anaconda Promt Icon Go to "More" and click on "Open as Administrator" Then type: python -m spacy download it_core_news_sm but I have the same error OSError: [E050] Can't find model 'it_core_news_sm'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
Exception: Traceback (most recent call last): File "C:\python\lib\site-packages\pip_internal\cli\base_command.py", line 176, in main status = self.run(options, args) File "C:\python\lib\site-packages\pip_internal\commands\install.py", line 346, in run session=session, autobuilding=True File "C:\python\lib\site-packages\pip_internal\wheel.py", line 848, in build assert building_is_possible AssertionError
Same here.
python -m spacy download de_core_news_md
Requirement already satisfied: de_core_news_md==2.1.0 from https://github.com/explosion/spacy-models/releases/download/de_core_news_md-2.1.0/de_core_news_md-2.1.0.tar.gz#egg=de_core_news_md==2.1.0 in c:\programdata\anaconda3\lib\site-packages (2.1.0)
✔ Download and installation successful
You can now load the model via spacy.load('de_core_news_md')
but actually loading it fails with
lib\site-packages\spacy\util.py in load_model(name, **overrides)
134 elif hasattr(name, "exists"): # Path or Path-like to model data
135 return load_model_from_path(name, **overrides)
--> 136 raise IOError(Errors.E050.format(name=name))
137
138
OSError: [E050] Can't find model 'de_core_news_md'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
I am using spacy 2.1.3 via coda on windows
Worked when I run Anaconda Prompt as an Administrator. Thanks
Hi,
I really need help with the installation of en model. I have successfully installed spacy using the following command:
sudo conda install -c conda-forge spacy (since everyone suggested to login as administrator)
But when I want to install the en model using the following command:
sudo python -m spacy download en
I received the following errors:
Traceback (most recent call last):
File "/Users/mycomputer/anaconda3/lib/python3.6/runpy.py", line 183, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "/Users/mycomputer/anaconda3/lib/python3.6/runpy.py", line 142, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "/Users/mycomputer/anaconda3/lib/python3.6/runpy.py", line 109, in _get_module_details
import(pkg_name)
File "/Users/mycomputer/anaconda3/lib/python3.6/site-packages/spacy/init.py", line 12, in
Can someone help me with this?
Thanks
I installed the spacy and used python3 -m spacy download en to link successfully. Linking successful /Users/kindler/anaconda3/lib/python3.6/site-packages/en_core_web_sm --> /Users/kindler/anaconda3/lib/python3.6/site-packages/spacy/data/en
You can now load the model via spacy.load('en')
If I use the terminal python command line it will be load normally, but use the pycharm in the same virtualenv environment it will report an error.
/Users/kindler/.virtualenvs/allennlp_latest/bin/python /Users/kindler/Documents/Projects/2019/4/preprocessing_dataset/processing/FewRel/preprocessing.py
Loading the json files ...
Traceback (most recent call last):
File "/Users/kindler/Documents/Projects/2019/4/preprocessing_dataset/processing/FewRel/preprocessing.py", line 24, in <module>
main()
File "/Users/kindler/Documents/Projects/2019/4/preprocessing_dataset/processing/FewRel/preprocessing.py", line 12, in main
dataloader = JSONDataLoader()
File "/Users/kindler/Documents/Projects/2019/4/preprocessing_dataset/processing/FewRel/data_loader.py", line 17, in __init__
self.nlp = spacy.load("en")
File "/Users/kindler/.virtualenvs/allennlp_latest/lib/python3.6/site-packages/spacy/__init__.py", line 21, in load
return util.load_model(name, **overrides)
File "/Users/kindler/.virtualenvs/allennlp_latest/lib/python3.6/site-packages/spacy/util.py", line 119, in load_model
raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
Can someone help me with this?
Thanks .
Im using Python 3.6 and "python3 -m spacy download en" while in my site-packages directory worked for me!
Thanks,
@ClaudeCoulombe try this in your terminal
python -m spacy download en
does that work?
Thanks,it works for me.
No it says it can't link
You need to do sudo python -m spacy download en
It worked for me too, thank you!
I tried all the methods above and it didn't work, what finally worked for me was ensuring I was installing spacy==2.0.13 (from issue #2849). Now if i spacy.load('en') it works and it links. When I start python in the anaconda prompt box, import spacy and type spacy.load('en') then run it, it works. However, when, I try and run it in my spyder console (3.3.5) using a environment running python 3.6, where Spacy is also installed, I get the same error:
OSError: [E050] Can't find model 'en'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
Anyone know why there is a discrepnacy between my IPython console on spyder and my anaconda prompt?
On linux this worked for me:
First install the module without sudo rights with python -m spacy download nl_core_news_sm
Then, to import it:
import os.path as p
import spacy
env_path = p.join(p.expanduser("~/.local/bin/anaconda3/envs/<env-name>"))
path_to_module = p.join(env_path, "lib/python3.7/site-packages/nl_core_news_sm/nl_core_news_sm-2.1.0")
nlp = spacy.load(path_to_module)
I think this can (and should) be fixed by using the name of the executable to find the module in scipy.load
, something like:
import sys, os
def find_model(model_name):
path_to_env = p.abspath(p.join(sys.executable, "../.."))
path_to_modules = p.join(path_to_env, f"lib/python{sys.version[:3]}/site-packages")
path_to_model = p.join(path_to_modules, model_name)
if not p.exists(path_to_model):
raise FileNotFoundError(path_to_model)
model_dir = [d for d in os.listdir(path_to_model) if d.startswith(model_name)][0]
return p.join(path_to_model, model_dir)
find_model("nl_core_news_sm")
i have to try this "python -m spacy download en", but still doesn't work. It says "Download successful but linking failed". Anyone can help me to fix this problem?
i have to try this "python -m spacy download en", but still doesn't work. It says "Download successful but linking failed". Anyone can help me to fix this problem?
Maybe a permission problem? also there are different way to get that, you may want to try:
python -m spacy download en_core_web_sm
Okay, I had the same problem, but i figured out the solution: 'en_core_web_sm' : us ethis when you're not admin 'en' : can be used when you are admin. .
Linking fails because of admin rights over your system, but it's no big deal you can use the other counter-part.
python -m spacy download en
@hamelsmu This works perfect on windows running anaconda
Try this hopefully it will work on my case i am using mac OS python -m spacy download en_core_web_lg
While using command python -m spacy download en the package 'en_core_web_sm' automatically comes into the picture and get installed Also, it is better to use en_core_web_sm instead of en for models
@koliko are you running this code inside the provided docker container? if not, looks like you do not have spacy installed, so you will have to first install spacy
pip install spacy
Sir, I have installed spacy as well but it is still showing that there no module named spacy
@koliko are you running this code inside the provided docker container? if not, looks like you do not have spacy installed, so you will have to first install spacy
pip install spacy
@hamelsmu Sir, I have installed spacy as well but it is still showing that there no module named spacy
Please search on stack overflow
Download successful but linking failed Creating a shortcut link for 'es' didn't work (maybe you don't have admin permissions?), but you can still load the model via its full package name: nlp = spacy.load('es_core_news_sm') This is how it worked for me!!! Thank you!!!
This wasnt working for me after trying all of the above solutions. To make it work I did the following:
1) Right-click on Anaconda prompt -> run as administrator 1.1) python -m spacy download en 2) Right-click on Spyder -> run as admistrator Then once inside spyder (as admin) i was able to: import spacy nlp = spacy.load('en')
For those using Anaconda I found the following solution to install the en package and link it succesully:
- Right clik on the Anaconda Promt Icon
- Go to "More" and click on "Open as Administrator"
- Then type:
python -m spacy download en
It worked for me
Thank so muuuuch SamCurtis111 !
Hi, this got resolved when i opened the cmd prompt as an Administrator, kindly open anaconda as an admin and then run the same commands, it should work.
Yes! This works. Open the anaconda env as an administrator.
For those using Anaconda I found the following solution to install the en package and link it succesully:
1. Right clik on the Anaconda Promt Icon 2. Go to "More" and click on "Open as Administrator" 3. Then type: `python -m spacy download en`
It worked for me
i tried everything and this worked finally!! thank you
Hi, if still any one has issue with this, try to download with full name:
python -m spacy download en_core_web_sm --user
will work.
Thanks,
@ClaudeCoulombe try this in your terminal
python -m spacy download en
does that work?
Thanks,it works for me.
No it says it can't link
Run console as admin!
Hi, if still any one has issue with this, try to download with full name:
python -m spacy download en_core_web_sm --user
will work.
use this, new error ocurrs as follows: raise ConnectionError(e, request=request) requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /explosion/spacy-models/master/shortcuts-v2.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000002C088DB34E0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed',))
I've imported the data and install keytext without problem but I've got the error below when trying to execute
from ktext.preprocess import processor
It seems that the spaCy 'en' model can't be loaded. I'm using Python 3.6 on Mac OS 10.12.6
By the way, I would like to share your blog post with the G+ Deep Learning community but I have the habit to validate every tutorial myself before.
`--------------------------------------------------------------------------- OSError Traceback (most recent call last)