Comments (13)
1.5.2 was just released, which further addresses the NumPy dependency issue. I think this should solve your problem. I'm going to go ahead and close this issue, but please let me know if you're still experiencing this problem with 1.5.2.
from pyxdameraulevenshtein.
How did you install it? Did the pip install succeed? I haven't actually tried installing this on Windows 10 except for within the bash subsystem (which does work).
from pyxdameraulevenshtein.
I have installed it vie pip as the dependency of textdistance package (i opened an issue there but they forwarded me here). So i just did this:
pip install textdistance[extras]
to install. And it succeded.
from pyxdameraulevenshtein.
Can you try installing pyxdameraulevenshtein
by itself using pip and let me know if that works?
from pyxdameraulevenshtein.
Same crash on import after pip install pyxdameraulevenshtein on clean venv.
from pyxdameraulevenshtein.
Would you mind creating a fresh virtual environment and installing with the following command?:
pip install --verbose pyxdameraulevenshtein
Please paste the contents of that output here so that I can get a little more insight into what's going on.
from pyxdameraulevenshtein.
@gfairchild i created fresh venv and installed with --verbose. Got this suspicious error:
--- Logging error ---
Traceback (most recent call last):
File "c:\users\user\anaconda3\Lib\logging_init_.py", line 983, in emit
stream.write(self.terminator)
File "c:\users\user\envs\new\lib\site-packages\pip_vendor\colorama\ansitowin32.py", line 141, in write
self.write_and_convert(text)
File "c:\users\user\envs\new\lib\site-packages\pip_vendor\colorama\ansitowin32.py", line 169, in write_and_convert
self.write_plain_text(text, cursor, len(text))
File "c:\users\user\envs\new\lib\site-packages\pip_vendor\colorama\ansitowin32.py", line 174, in write_plain_text
self.wrapped.write(text[start:end])
OSError: raw write() returned invalid length 4 (should have been between 0 and 2)
Call stack:
File "c:\users\user\anaconda3\Lib\runpy.py", line 184, in run_module_as_main
"main", mod_spec)
File "c:\users\user\anaconda3\Lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\user\Envs\new\Scripts\pip.exe_main.py", line 9, in
sys.exit(main())
File "c:\users\user\envs\new\lib\site-packages\pip_init.py", line 248, in main
return command.main(cmd_args)
File "c:\users\user\envs\new\lib\site-packages\pip\basecommand.py", line 215, in main
status = self.run(options, args)
File "c:\users\user\envs\new\lib\site-packages\pip\commands\install.py", line 342, in run
prefix=options.prefix_path,
File "c:\users\user\envs\new\lib\site-packages\pip\req\req_set.py", line 784, in install
**kwargs
File "c:\users\user\envs\new\lib\site-packages\pip\req\req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "c:\users\user\envs\new\lib\site-packages\pip\req\req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "c:\users\user\envs\new\lib\site-packages\pip\wheel.py", line 273, in move_wheel_files
logger.debug(stdout.getvalue())
Message: ''
Arguments: ()
But afterall "Successfully installed numpy-1.14.2 pyxdameraulevenshtein-1.5".
from pyxdameraulevenshtein.
Is that the complete output of pip install
?
Ok, so from what I can tell right now, it looks like the error is in the installation, not the use, of pyxdameraulevenshtein. We need to figure out how to be able to get you to install this on Windows. As indicated on the readme, you need to be able to compile C code. On Linux/Macs, this is easy. Using the Bash subsystem on Windows (which I'd highly recommend checking out if you haven't already), this is easy. I've never tried it on native Windows, though. Additionally, it looks like you're using Anaconda, which I've also never used, so I'm not sure how that affects things.
https://wiki.python.org/moin/WindowsCompilers#Microsoft_Visual_C.2B-.2B-_14.0_standalone:_Build_Tools_for_Visual_Studio_2017_.28x86.2C_x64.2C_ARM.2C_ARM64.29 may be a good place to start. So, as those instructions say, try this:
- Install Microsoft Build Tools for Visual Studio 2017.
pip install --upgrade setuptools
pip install --verbose pyxdameraulevenshtein
Let me know if that solves your problem.
from pyxdameraulevenshtein.
After i cloned the repo and installed from source (python setup.py install) i now get all the things work good. Also there is no crash on import pyxdameraulevenshtein
as well. It is good in both clean venv and any existing venv as well.
So maybe the bug is somewhere in pypi version difference?
from pyxdameraulevenshtein.
That's certainly interesting. The PyPI version is identical to master right now. Nothing has changed. So after trying what I just suggested, you still can't install from PyPI?
from pyxdameraulevenshtein.
New scenario appeared:
- I cleaned up all the pip cache
pip install --verbose pyxdameraulevenshtein
. Full log of this is attached. But this time numpy was not installed as a dependency. So afterimport pyxdameraulevenshtein
i just gotImportError: no module called numpy
pip install numpy
v1.14.2 is installed.- Now everything works good.
So if my cached numpy was broken i dont get why installing pyxdameraulevenshtein from source didnt cause the issue.
from pyxdameraulevenshtein.
Very interesting. NumPy should automatically be installed, but that's clearly not the case. In fact, I just tried it on an empty virtual environment on my PC (using the Ubuntu subsystem on Windows 10), and I can replicate what you're referring to.
I need to fix setup.py
so that NumPy is properly installed by pip if it's not already there. I'm currently essentially doing what https://stackoverflow.com/a/21621689/1269634 suggests, but that's clearly not working.
from pyxdameraulevenshtein.
I just modified setup.py
a bit to actually remove some NumPy-related code that seemed to be causing various issues. I've made the decision to expect the user to explicitly install NumPy prior to installing this library. 1.5.1 is now live on PyPI. I think this will fix your issue. Can you try and let me know?
from pyxdameraulevenshtein.
Related Issues (20)
- Great -> Grreat != Meat -> Meet HOT 2
- Unable to install as a setup.py dependency HOT 25
- 'ValueError: numpy.ufunc has the wrong size, try recompiling' when install pyxDamerauLevenshtein HOT 27
- would it be possible to add the limit/threshold in the Damerau Levenshtein? HOT 1
- numpy.dtype error HOT 16
- How to make edits to the source code HOT 3
- Cannot install module on Python 3.7 HOT 1
- is it possible to include a method to return a sequence of edit operations performed similar to editops in python-Levenshtein? HOT 2
- Distance is one too small if first string is longer HOT 5
- Distance between "abc", "abcde" is 2 but between "abcde", "abc" is 1 HOT 1
- Python 3.5 numpy support HOT 2
- Error Installing through Pip on Python3.7 on Linux Ubuntu 18.04 HOT 3
- Failure with numpy 1.18.4 HOT 9
- 1.6.2 tag missing on GitHub HOT 1
- ImportError: cannot import name 'damerau_levenshtein_distance_ndarray' HOT 10
- PEP561 type stubs for mypy HOT 10
- reproducing benchmark results HOT 3
- New portal
- Clarify that pyxDamerauLevenshtein calculates the restricted Damerau-Levenshtein distance HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyxdameraulevenshtein.