Tried installing Vim 7.3 so I first installed Mercurial, which allowed me to clone vim source code off Googlecode. This was done successfully.
Problem started from here:
cd vim/src
./configure --enable-pythoninterp --with-features=huge -prefix=$HOME/opt/vim
which drew this response from the terminal:
configure: loading cache auto/config.cache
checking whether make sets $(MAKE)... no
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in `/Users/JayEdge/vim/src':
configure: error: no acceptable C compiler found in $PATH
See `config.log' for more details.
Tried looking at config.log (in my case it was auto/config.log) but I'm not sure what to look out for.
Background: I've checked that Xcode is installed properly, and gcc.vim was found inside the route vim/runtime/compiler. Should I move this (or duplicate this) into another folder? If so, which folder to move it into?
Like Karoly said, you need a c compiler. Since it looks like you are running OSX (based on your xcode comment I would suggest grabbing the OSX-GCC installer at the following site:
https://github.com/kennethreitz/osx-gcc-installer
I would also look into grabbing homebrew for installing things like vim.
Cheers,
Sean
no acceptable C compiler found in $PATH
That's a pretty clear error message, you need to install a compiler, if you haven't done sone.
Install gcc.
If you already installed gcc you have to add the path so configure can find it, eg:
export PATH="$PATH:/usr/bin"
Problem has been solved and here's to share with anyone if they have the same problems, specifically for people who install xCode via the app store after March 2012. (Credits to my Python Mentor, Martin)
Xcode from the app store currently only allows you to download the IDE, which is not what we want. What we want is the Apple Developer Tools, which you can get via https://developer.apple.com/xcode/ after signing up as a Apple Developer. Search for "Command Line Tools, late March 2012", install it and the configure command earlier should work properly.
Otherwise, you may refer to Sean's answer earlier.
FYI, I do intend to install homebrew but as a beginner, compiling it from source code is a great way of picking up some basics, interact with some basic syntax (or learn to parse them).
you can try it:
yum install gcc
Related
I am trying to install jedi-vim. I am doing this at work - so I have to use gVim in Windows. I have already read several other posts in this forum. This has somehow made me smarter but still does not solve my problem.
I did the following things:
installed Pathogen
cloned jedi vim from https://github.com/davidhalter/jedi-vim.git and copied it to the bundle/ folder in the vim-dir.
Now, when I open a *.py-file vim always tells me
jedi-vim requires vim compiled with +python
but ':version' tells me that it's compiled with +python/dyn and +python3/dyn.
So what is the problem?
Additional infos:
vim version: 7.4
When I use ctrl+space to autocomplete a python key word, it tells me:
Error detected while processing function jedi#completions: line 1: E492: Not an editor command: Python jedi_vim.completions()
Error detected while processing function jedi#completions: line 1: E492: Not an editor command: Python jedi_vim.completions()
Press ENTER or type command to continue
I'm not sure if your are still experiencing the same issue, but after looking around I found this blog post that solved the problem for me. Essentially, it's just about re-installing vim (don't delete any config files) and then reinstalling from the source at the vim mercurial repo with the right flags. There might be a shorter/simpler version of doing this, but after trying back and forth many solutions, this one was the only one that worked:
Compiling Vim with Python and Ruby support on Ubuntu
These are the steps:
Check if Vim is compiled with Python:
$ vim --version | ack '(python)'
Remove Vim version installed:
$ sudo apt-get remove vim-common vim-runtime
Install dependencies needed to compile Vim:
$ sudo apt-get build-dep vim
Clone Vim repository, compile it and install the new version:
$ hg clone https://vim.googlecode.com/hg/ vim
$ cd vim
$ ./configure --enable-pythoninterp
$ make
$ sudo make install
+python/dyn means that Python support isn't statically compiled it, it's loaded dynamically when needed at runtime.
This is described in the python-dynamic help section:
On MS-Windows the Python library can be loaded dynamically. The |:version| output then includes |+python/dyn|.
This means that Vim will search for the Python DLL file only when needed.
When you don't use the Python interface you don't need it, thus you can use
Vim without this DLL file.
To use the Python interface the Python DLL must be in your search path. In a console window type "path" to see what directories are used.
The name of the DLL must match the Python version Vim was compiled with.
Currently the name is "python24.dll". That is for Python 2.4. To know for
sure edit "gvim.exe" and search for "python\d*.dll\c".
(Don't worry about the 2.4 there; I just happened to find docs from a few years ago. Read the help in your own copy of vim—or, better, do what the last paragraph says.)
So, either you don't have Python, you have the wrong version of Python, it's not on your %PATH%, vim is searching for it incorrectly, or it's failing to load.
At that time the problem was another one. I mixed up the architectures for vim and python - I used vim64Bit, but pyhton for 32bit.
I repaired that already some time ago but the other day I had to restart my computer and do some microsoft-Updates.
Unfortunately my vim (7.4) was totally broken. I had to re-set my home-dir. Then at least my vimrc was accessible again, but still my jedi in vim does not work.
Python is available in vim but still jedi does not seem to load correctly.
When I type "len(" in the beginning of a .py-file, at the place where arguments should be explained there are some strange characters, similar to this:
==jedi=0, == (_object_*) ==jedi==
When I type "self.", it says "unknown function: pythoncomplete#Complete"
I think it's only a configuration-issue, because it worked before the reboot.
Jedi is installed systemwide (with pip). If I try to install it "again", pip says that jedi is already installed.
I would appreciate your help very much ;-)
I am trying to install python with pygtk in my ubuntu system.
I don't have root access so I need to install all the packages locally say /home/user/local/lib
I am able to install python, but I am not able to link other packages(pygobject, pygtk, etc) to the locally installed python.
And if I try to install pygtk locally using the command
./configure --prefix=/home/shrihari/local/lib/pygtk2.24/
It gives the following error
checking for GLIB - version >= 2.8.0... yes (version 2.28.6)
checking for PYGOBJECT... yes
checking for gio-types.defs... no
checking for ATK... yes
checking for PANGO... yes
checking for codegen... configure: error: unable to find PyGObject codegen
My default python version is python2.4. If I try to import pygtk in python2.4 it works fine but i need pygtk in python2.7.
So how can I achieve this?
If there is any good documentation available for installing python, pygtk, pygobject locally in user space please share.
Thanks in advance
In general, to be able to link a build to something already installed, you need to have set up the LD_LIBRARY_PATH and (for Python modules) PYTHONPATH to the directories where you have installed that "something". So in this example, if you install Python 2.7 with prefix /home/shrinari/local/python27, you need afterwards set the system variables like this (for bash):
export LD_LIBRARY_PATH=/home/shrinari/local/python27/lib:$LD_LIBRARY_PATH
export PYTHONPATH=/home/shrinari/local/python27/lib/python2.7/site-packages:$PYTHONPATH
export PKG_CONFIG_PATH=/home/shrinari/local/python27/lib/pkgconfig:$PKG_CONFIG_PATH
And after that you can try to compile something dependent on your new Python installation.
But, according to the configuration error provided, I don't think this helps in your situation. It seems that you have something missing from PyGObject, maybe just header files, maybe some module (I don't know PyGObject specifics). Anyway, why the configure script can not find something is usually better visible from config.log file which can be found in the build directory after running the configure script.
This error is because of compatibility between pygobject and gobject-retrospection. To avoid this use Pygobject build earlier than 2.90.1 if your GTK is old. I Used following on CentOS 5.5 to make it work -
pygobject-2.28.6
When building pygobject disable introspection with --disable-introspection
gobject-retrospection 1.32.1
i am trying to install pycairo 1.10.0 for use with my custom-build python 3.1. however,
sudo /flower/bin/easy_install-3.1 pycairo
fails with
XXX#XXXX:/adventures$ sudo /flower/bin/easy_install-3.1 pycairo
install_dir /flower/lib/python3.1/site-packages/
Searching for pycairo
Reading http://pypi.python.org/simple/pycairo/
Reading http://cairographics.org/pycairo
Best match: pycairo 1.10.0
Downloading http://cairographics.org/releases/pycairo-1.10.0.tar.bz2
Processing pycairo-1.10.0.tar.bz2
error: Couldn't find a setup script in /tmp/easy_install-zeG9HB/pycairo-1.10.0.tar.bz2
and indeed, there is no setup.py in the said download; instead, the INSTALL says:
Install Procedure
-----------------
$ ./waf --help # shows available waf options
$ ./waf configure # use --prefix and --libdir if necessary
# --prefix=/usr --libdir=/usr/lib64 for Fedora 64-bit
$ ./waf build
$ ./waf install
Use
$ python3 ./waf ...
if you have python2 and python3 installed, and the default is python 2.
Testing
-------
See test/README
i understand that as telling me that i should
sudo /flower/bin/python3.1 ./waf configure --prefix=/flower/pycairo/
or similar; however, this leads to the following error:
./options()
Setting top to : /tmp/pycairo-1.10.0
Setting out to : /tmp/pycairo-1.10.0/build_directory
./configure()
Checking for 'gcc' (c compiler) : ok
Checking for program python : /usr/bin/python
python executable '/usr/bin/python' different from sys.executable '/flower/bin/python3.1'
Checking for python version : (2, 6, 5, 'final', 0)
The python version is too old, expecting (3, 1, 0)
so i went down into the source code; there is seemingly no way to tell this waf thingie that the targetted python version is simply the one it runs on itself, so i fumbled around and got as far as this:
Checking for 'gcc' (c compiler) : ok
Checking for program python : /usr/bin/python
#############293 /flower/bin/python3.1
Checking for python version : (3, 1, 2, 'final', 0)
Checking for library python3.1 in LIBDIR : yes
Checking for program python3.1-config : not found
Checking for program python-config-3.1 : not found
Checking for header Python.h : Could not find the python development headers
Checking for [] : not found
The configuration failed
i do in fact have a file /flower/bin/python3.1-config so i don't get it. the python code that does all this is rather hard to handle.
any suggestions how to go on? is there a *.deb or similar ready for pycairo + python 3? couldn't find any.
By looking at the python.py file in that subdir I decided to try setting an environment var before executing the waf thru python3:
export PYTHON="python3"
And then the install mysteriously succeeded...
I'm using Ubuntu Karmic, but installing with python2.7 compiled from source, so this is a work around I found in my case. I though it might be helpful, but please use caution.
I found some discussion threads that has similar installation problems here
Although it's not the same python version, there are some flags which you can set for waf.
I got past that Python.h part after using the following command
LDFLAGS="-lm -ldl -lutil" ./waf configure
As I have compiled from source python2.7, I need to reroute the paths with CFLAGS.
The final command looks like this:
CFLAGS="-l/usr/local/include/python2.7 -l/usr/local/bin" LDFLAGS="-lm -ldl -lutil" ./waf configure
I have no idea how the LDFLAGS work, so use with caution.
Alternatively (dangerous method), if you don't want to set the CFLAGS, I did do some symbolic-re-linking in the /local/bin of python to my python2.7, same with python-config to python2.7-config (if you installed from package manager, you might not need to do this)
This is clearly a bug in the pycairo installer, where it tries to figure out where the Python exe is (when what it should do is to simply use the Python exe that it is run with).
I tried to find it, but this code is using its own completely custom build system (it's not onvious why) and the code is laid out in a very weird way, astonishingly with major parts of the code hidden(!) in a directory called .waf3-1.6.4-e3c1e08604b18a10567cfcd2d02eb6e6 and written in some of the most unreadable Python code I've ever seen. As such it would take me hours to understand this code and help you with what probably is a trivial bug.
If you really need this library I suggest you contact the author and ask him nicely if he can fix the bug.
I'm trying to get node.js running on Windows 7. I have no experience with Linux so I've just been blindly following instructions from tutorials I've found, but I'm still unable to build node.js.
What I did:
Install Cygwin - the entirety
Attempt to build node.js
This is the error I first got:
I then followed the commands of two other similar sites and they all resulted in this error (could getting several version of node have caused me more problems? I'm completely clueless on this).
I read somewhere that the Windows version of Python could be causing the problem so I uninstalled my Python 2.7 and added C:\cygwin\bin to the PATH.
That still didn't work and I read somewhere else that I'm supposed to rebaseall so I tried that, but I also got an error for that:
That's where I'm at now. Have any steps I've taken exacerbated the situation?
Add -e '/\/sys-root\/mingw\/bin/d' at line 110 in /bin/rebaseall file.
Then re-run rebaseall -v and you shouldn't get the error anymore.
See this pretty helpful blog posting - Node on CygWin doesn't work for Node v0.2.5. Use the latest v0.4.0 version instead.
Also consider the post's recommendation of compiling against MinGW instead of in CygWin.
First of all, why did you check out such an old release v0.2.5? When I did it a few weeks ago I just took the latest and ended up with 0.5.0pre, but it would also be reasonable to specify v0.4.3. For instance, type git clone git://github.com/joyent/node.git to download node, and then:
cd node
./configure
make install
Secondly, do not rebase by running ash from the CYGWIN shell. Instead, shutdown all Cygwin processes, then use Windows explorer to open the ash.exe binary. Since I have a Windows 7 system without node.js, I decided to follow my instructions and build. Not so easy. I ran into some wierd dll issues that all went away when I ran ./rebaseall followed by ./perlrebase from the ash prompt. It seems that rebaseall is not sufficient anymore.
Thirdly, there is a message that makes it sound like you don't have a C compiler. Some googling will lead you to sites telling which Cygwin packages you need, but at minimum install the g++ compiler and that should pull in C as a dependency.
When I did this I simply ran configure and every time there was an error, installed one more Cygwin package to supply the missing piece. Even OpenSSL is available.
What I just found is remove the windows based install of Python. After uninstalling this, everything is peachy.
I like cygwin a lot -- but recent releases have become pretty unreliable. Some packages just wont build, and some "standard" apps dont work e.g. gvim's "save as" bombs out on my installation.
A possible solution would be run one of the better Linux distributions (ubuntu, fedora, suse etc.) either as a virtual machine or a dual boot setup and do the build inside linux.
In order to install Python XMP Toolkit,
I
need to install Exempi on my Mac, but doing this is becoming a real nightmare...
After a lot of trouble, i finally made it with boost, and had the fantastic
The Boost C++ Libraries were successfully built!
The following directory should be added to compiler include paths:
/usr/local/boost_1_44_0
The following directory should be added to linker library paths:
/usr/local/boost_1_44_0/stage/lib
Right now I'm trying to configure Exempi, with the command
./configure --with-boost=/usr/local/boost_1_44_0/
but it always get stuck on this:
checking for Boost headers version >= 1.33.0... /usr/local/boost_1_44_0/
checking for Boost's header version... 1_44
checking for the toolset name used by Boost for g++... gcc40
checking boost/test/unit_test.hpp usability... yes
checking boost/test/unit_test.hpp presence... yes
checking for boost/test/unit_test.hpp... yes
checking for the Boost unit_test_framework library... no
configure: error: Could not find the flags to link with Boost unit_test_framework
I've been googlin for a couple of days, but I couldn't find anything useful...
Anyone had the same problem before? I would die for a helping hand... every hint is welcome!
EDIT:
I've made it with port and now it finally says exempi #2.1.1_0 (active).
The problem is that when I try to load the XMP toolkit, it doesn't find exempi, and raises an error, as reported on the installation guide:
in case you haven’t installed Exempi you will get an ExempiLoadError exception once you try to load libxmp.
What can I do?
I'm assuming that you installed Boost manually, given that it's in /usr/local. I was able to install both Boost and Exempi through MacPorts.
Looks like you didn't build the boost test library when you built boost. You need to add --with-test to your bjam invokation:
./bjam --with-test