Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

import error #9

Closed
kakakhan2016 opened this issue Jan 14, 2017 · 1 comment
Closed

import error #9

kakakhan2016 opened this issue Jan 14, 2017 · 1 comment

Comments

@kakakhan2016
Copy link

kakakhan2016 commented Jan 14, 2017

Thanks for great package. I am using python 32 with windows 7 and successfully installed arabic-reshaper using python setup.py install command but fail to import it.
Using import arabic-reshaper in my code shows syntax error while using import arabic_reshaper showing error module not found. pip freeze showing package install with name arabic_reshaper. Note that how python convert dash into underscore
For workaround I have replace all occurrence of arabic-reshaper with arabicreshaper in .py file and compile again. Now import arabicreshaper import work.
I search net about using dash in python package name and found that many people are facing problem.

Do you have solution for import arabic-reshaper error?

@mpcabd
Copy link
Owner

mpcabd commented Jan 15, 2017

I cannot reproduce your problem. Make sure you're installing the reshaper correctly, you can install it using pip pip install git+https://github.com/mpcabd/python-arabic-reshaper

Running Python 3.6.0:

(test_3) test_3 % pip install git+https://github.com/mpcabd/python-arabic-reshaper
Collecting git+https://github.com/mpcabd/python-arabic-reshaper
  Cloning https://github.com/mpcabd/python-arabic-reshaper to /private/var/folders/wd/wh_b1h096f12bc2x4xfrfz340000gn/T/pip-3r_5334i-build
Installing collected packages: arabic-reshaper
  Running setup.py install for arabic-reshaper ... done
Successfully installed arabic-reshaper-1.0.1
(test_3) test_3 % python
Python 3.6.0 (default, Dec 24 2016, 08:01:42)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import arabic_reshaper
>>> arabic_reshaper.reshape('مرحبا')
'ﻣﺮﺣﺒﺎ'

Running Python 2.7.13:

(test_2) test_2 % pip install git+https://github.com/mpcabd/python-arabic-reshaper
Collecting git+https://github.com/mpcabd/python-arabic-reshaper
  Cloning https://github.com/mpcabd/python-arabic-reshaper to /private/var/folders/wd/wh_b1h096f12bc2x4xfrfz340000gn/T/pip-1ymtRf-build
Installing collected packages: arabic-reshaper
  Running setup.py install for arabic-reshaper ... done
Successfully installed arabic-reshaper-1.0.1
(test_2) test_2 % python
Python 2.7.13 (default, Dec 18 2016, 07:03:39)
[GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.42.1)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import arabic_reshaper
>>> arabic_reshaper.reshape(u'مرحبا')
u'\ufee3\ufeae\ufea3\ufe92\ufe8e'
>>>

@mpcabd mpcabd closed this as completed Jan 15, 2017
mpcabd added a commit that referenced this issue Sep 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants