Error while importing enchant from pyenchant on windows - python

I have installed pyenchant on my system, but when I run "import enchant" command, I get an error telling me "The enchant 'C' library was not found". I have tried installing Abiword word processor to install enchant separately, so to speak. But still getting the same error.
I have read the solutions in "enchant C library not found" while installing pyenchant using pip on OSX, but that is for Mac and I am running on Windows 8.1

You need to install the C library called Enchant. I have problems myself to install C libraries, but surely downloading Enchant will be a first step.
This post gives some explanation about how to install a C library:
How do I install C packages on windows
but I have to admit this did not solve quite my problem. Do not hesitate to update if find more info.

The issue is related to the version of pyenchant. You need to first check what is the version of pyenchant installed on your machine.
For Unix based systems you can run (Please find suitable windows command)
pip show pyenchant
Then install below version :
pip install pyenchant==2.0.0
Let me know if this works for you.

Related

How to pip install forex python

I am attempting to install forex-python. I have attempted to find a meaningful answer to this question everywhere, however my search has been in vain. Now, the Python Software Foundation's instructions are to pip install it. I am currently using Python V3.6.1 and the Foundation states that versions 3.4 or greater have pip installed directly into them. I am using the executable installer of v3.6.1.
My question is this: where do you pip install this package on Windows? I attempted to install the package in the python command prompt, tagged Python 3.6(64 bit), using the statement
pip install forex-python
though it resulted in a syntax error.
Is the module supposed to be installed on the Python interpreter? Since I am using Windows Vista, what is the Windows version of a terminal? I am unaccustomed to a Windows operating system on a Toshiba computer and I am more familiar with Mac OS X. If there is a version, what is it called and how do I find it? And if it is supposed to be installed on the Python interpreter, why does it give a syntax error when I enter the statement?
When I asked for help, it stated all information about pip, however it did not state how to install forex-python.
I currently have forex-python downloaded on this computer, symbolized by the logo of three books. It is complete with the code, readmes and files, however, I do not know how to install it for usage in IDLE programs, like my currency converter.
I would be very grateful for any help on this subject.
you can try
pip install forex-python
or
pip install git+https://github.com/MicroPyramid/forex-python.git
then you can check the installation through
pip freeze
if it is listed in it then it is installed

How to install module and package in python

I'm trying to start with OpenCV with python. I have experience c# and I have knowledge of c++. However, I feel more comfortable with python instead of c++. I installed OpenCV then python 3.4 in visual studio 2015. At the beginning I've received an error numpy, "Module couldn't be found", thankfully, I resolved it. The I got another error cv2 "Module couldn't be found" I asked an question yesterday, but I think the question has been left away. Anyways, I'm not complaining, but I still need some help please to stat with OpenCV in python.
Installing python 3.4 Successful
Installing numpy Successful
installing matpilotlib Failed
installing cv2 Failed
can anybody help me please thanks a lot.
It's very common to install Python packages through pip today (recursive acronym for pip installs packages). However, this is not that trivial under Windows.
How to install matplotlib:
Try to open a commandline and type in pip install matplotlib. If this does not work, you'll need to do some more work to get pip running. I gave a detailed answere here: Not sure how to fix this Cmd command error?.
How to install OpenCV:
The Python OpenCV DLL must be made for your version of Python and your system architecture (or, to be more specific, the architecture your Python was compiled for).
Download OpenCV for your Python version (2/3)
Try replacing the x64 version with the x86 version
There are a lot of different binaries here: http://www.lfd.uci.edu/~gohlke/pythonlibs/#opencv. Try to get the one exactly matching your Python version and System architecture and install it via pip (cp35 means CPython version 3.5 ect.).
If you have the OpenCV .whl file matching your system configuration, do pip install file.whl.
Hope this helps!
You can install matplotlib using pip (which is already installed on your machine - mentioned in your previous quesiton):
pip install matplotlib
more info:
http://matplotlib.org/faq/installing_faq.html
You may be better off using an package such as pythonxy as a start, e.g. from https://python-xy.github.io/ , instead of installing each single package manually.

Gensim needs a C compiler?

Sorry that I don't have enough reputation to post images.
The main problem is that it tells me that I need to install a C compiler and reinstall gensim or the train will be slow, and in fact it is really slow.
I have installed mingw32, Visual Studio 2008, and have added the mingw32 environment variable to my path.
Any ideas on how to solve it?
Just as you I installed mingw32 and added MinGW\bin to my PATH variable. I then uninstalled gensim with pip uninstall gensim and tried reinstalling with pip install gensim. That however gave the same warning so instead I downloaded gensim-0.12.3.tar.gz from here. I unzipped the archive and also the inner one, opened a cmd window in the folder and ran python setup.py install to install gensim. Now I could already from the output see that it could see the MinGW install. It installed correctly and I could run gensim without the warning and much faster.
Similar to user1151923, after adding MinGW\bin to my path variable and uninstalling\reinstalling gensim through pip, I still received the same warning message. I ran the following code to fix this problem (installed gensim from conda).
pip uninstall gensim
conda install gensim
I had the same problem and tried many solutions, but none of them worked except degrading to gensim version 3.7.1.
When I installed it from conda-forge then I obtained a version that is already compiled and fast:
conda install -c conda-forge gensim

how to install scipy for python?

I have Python 2.7, and I have distutils installed.
I downloaded the latest version of Scipy for win 32.
For the life of me, I do not understand how to install it.
From the directions on the site, it states:
If you already have Python installed, the easiest way to install Numpy
and Scipy is to download and install the binary distribution from
Download.
I have followed the above directions and downloaded this.
I cannot figure what to do now!
How do I finish getting scipy installed?
It looks like you've downloaded the source distribution, which you would normally install by doing:
python setup.py install
However, without the proper C compiler environment and other libraries, it will probably fail. I'm guessing you really wanted to download the Windows binaries .
You have to drill a little further down in the sourceforge site to find it.
try downloading the windows binary ...
http://sourceforge.net/projects/scipy/files/scipy/0.11.0/scipy-0.11.0-win32-superpack-python2.7.exe/download
You'll be well off installing setuptools. Makes installing almost anything python-related a breeze!
e.g.
easy_install scipy
There's another one called pip.
easy_install pip
pip install scipy
just open windows command prompt and go to the directory you have installed Python. e.g
c:\python34>
Once there, just type python -m pip install scipy and press enter

Cannot install pyenchant on OSX

I am trying to install python bindings for the enchant library (pyenchant), according to the readme, it should be as simple as running python setup.py install
But when I try that, I get this error:
OSError: [Errno 2] No such file or directory: './tools/pyenchant-bdist-osx-sources/build/lib'
Can someone tell me what to do? I have tried google, but with no luck.
PS: I have this same question on serverfault, as I thought that was the most appropriate place for it, but with little help there, I am now trying here.
You need to install the enchant library first. On the download page pyenchant indicates that it is a prerequisite if you are building from source. (There are pre-build binaries listed for python 2.5 and 2.6 as well.)
I just installed enchant via homebrew on OS X 10.7 and then pyenchant installed without a problem.
If you decide to use homebrew for installing enchant, note that I had to brew install pkg-config separate as the recipe doesn't seem to install it as a dependancy (and fails as a result).
I believe you'll need to install
the Apple Developer Tools (XCode)
for your Mac OS X version.
If you haven't done so...
cheers
James

Categories

Resources