Cannot install pyenchant on OSX - python

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

Related

How to install modules with Python 2.4.3

I could not find anything on google about installing modules on this particular version 2.4.3 so I'm asking here.
I need to install python-ssl to use ssl package with python 2.4.3
I do not have any Scripts/pip.exe in my Python24 folder...
I've tried most commands yum / pip etc... nothing seems to work.
How to proceed please ?
You would probably need to make use of one of ancient methods of installation. Try download ssl file from PyPI, unpack it, go to catalog which was created when you unpacked it and do python setup.py install.

Error while importing enchant from pyenchant on windows

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.

Installing Mathics under Mac Os X

I am trying to install Mathics under Mac Os X Mavericks. The installation instructions states to install 3 libraries in advance (besides python): python-dev, libsqlite3-dev, and libgmp3-dev. I used Homebrew to install python but I can't find the other libraries. I found an article here on SE on how to find the headers but I do not know what to do to continue the installation. Running python initialize.py as stated in the instructions I get an error
/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: can't open file 'initialize.py': [Errno 2] No such file or directory
So, what are the replacements for the libraries in Homebrew?
Disclaimer: I'm the current Mathics maintainer.
Sorry, the instructions on the website are out of date. Instead, try
python setup.py initialize
The instructions on the wiki are up to date. (I haven't got access to the Mathics website so I can't fix them there).
Apologies again for the outdated documentation.

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

Import Error: No module named AppKit

I use Mac OS X Lion and Python 2.7. I am new to python. Can anyone tell me how to import AppKit and PyObjC to Python. But i get the errors when trying to import Import Error: No module named AppKit or 'Import Error: No module named PyObjC.
Trying easy_install does not help either.
What can i do to import these 2 modules?
If not already installed, install pip by running:
sudo easy_install pip
Then run:
## install for all users
sudo pip install pyobjc
or
## install for current user only
pip install pyobjc --user
NOTE: the general recommendation is to avoid using the system python, and use instead a user-maintained version, for example installed via brew install python3, macports, conda or whatever you already use for third party dependencies.
If you're on Mac it could be you're using the incorrect pip version, try sudo pip3 install -U pyobjc that solved it for me.
This a good guide on how to install PyObjc: http://ioanna.me/2009/09/installing-pyobjc-xcode-templates-in-snow-leopard/
When I was trying to install PyObjc I found it quite hard, but after a while, (and lots of google searches) I got it working.
Edit
I've found a more modern guide on how to do this. Download the templates and put them into your ~/Library/Developer/Xcode/Templates/ directory, and everything should work correctly.
If you are using PyCharm, you should install PyObjC package manually within it because of venv I guess. This was the only working solution for me.
In my case none of them worked. I was using Anaconda in my mac, later I discovered that the main issue with the Anaconda. Then I installed PyObjC with it's all supporting libraries inside Anaconda in a specific Environment.
I run the command line by clicking the Environment play icon and run my script.
It worked without any issues :)

Categories

Resources