Opened 14 years ago
Closed 14 years ago
#28664 closed defect (fixed)
qgis @1.6.0: ImportError: No module named sipconfig
Reported by: | barthelemy@… | Owned by: | Veence (Vincent) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 1.9.2 |
Keywords: | Cc: | ||
Port: | qgis |
Description
Installing qgis fails, because installing fcgi fails:
sudo port install qgis Portfile changed since last build; discarding previous state. ---> Computing dependencies for qgis ---> Dependencies to be installed: fcgi ---> Fetching fcgi ---> Attempting to fetch fcgi-2.4.0.tar.gz from http://lil.fr.distfiles.macports.org/fcgi ---> Verifying checksum(s) for fcgi ---> Extracting fcgi ---> Applying patches to fcgi ---> Configuring fcgi Error: Target org.macports.configure returned: autoreconf failure: shell command failed (see log for details) Error: Failed to install fcgi Log for fcgi is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_fcgi/main.log Error: The following dependencies were not installed: fcgi Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
The log for fcgi says:
:debug:configure Environment: CPATH='/opt/local/include' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_fcgi/work/.CC_PRINT_OPTIONS' LIBRARY_PATH='/opt/local/lib' CC_PRINT_OPTIONS='YES' MACOSX_DEPLOYMENT_TARGET='10.6' :debug:configure Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_fcgi/work/fcgi-2.4.0" && autoreconf --install -fvi' :info:configure sh: /opt/local/bin/autoreconf: /opt/local/bin/perl: bad interpreter: No such file or directory :info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_www_fcgi/work/fcgi-2.4.0" && autoreconf --install -fvi " returned error 126
However, installing fcgi directly works.
Then, installing qgis again fails again:
sudo port install qgis Password: ---> Computing dependencies for qgis ---> Fetching qgis ---> Verifying checksum(s) for qgis ---> Extracting qgis ---> Applying patches to qgis ---> Configuring qgis Error: Target org.macports.configure returned: configure failure: shell command failed (see log for details) Log for qgis is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_qgis/main.log Error: Status 1 encountered during processing. To report a bug, see <http://guide.macports.org/#project.tickets>
:info:configure Traceback (most recent call last): :info:configure File "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_qgis/work/qgis-1.6.0/cmake/FindSIP.py", line 8, in <modu le> :info:configure import sipconfig :info:configure ImportError: No module named sipconfig :info:configure CMake Error at cmake/FindSIP.cmake:54 (MESSAGE): :info:configure Could not find SIP :info:configure Call Stack (most recent call first)::info:configure CMakeLists.txt:399 (FIND_PACKAGE):info:configure :info:configure :info:configure -- Configuring incomplete, errors occurred!:info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_qgis/work/qgis-1.6.0/build" && cmake .. -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_MODULE_PATH=/opt/local/share/cmake/modules -Wno-dev -DCMAKE_CXX_COMPILER=/usr/bin/g++-4.2 -DCMAKE_C_COMPILER=/usr/bin/gcc-4.2 -DEXPAT_INCLUDE_DIR=/opt/local/include -DEXPAT_LIBRARY=/opt/local/lib/libexpat.dylib -DCMAKE_INSTALL_PREFIX=/Applications/MacPorts -DGDAL_CONFIG=/opt/local/bin/gdal-config -DGDAL_INCLUDE_DIR=/opt/local/include -DGDAL_LIBRARY=/opt/local/lib/libgdal.dylib -DGEOS_CONFIG=/opt/local/bin/geos-config -DGEOS_INCLUDE_DIR=/opt/local/include -DGEOS_LIBRARY=/opt/local/lib/libgeos_c.dylib -DGEOS_LIB_NAME_WITH_PREFIX=-lgeos_c -DGSL_CONFIG=/opt/local/bin/gsl-config -DICONV_INCLUDE_DIR=/opt/local/include -DICONV_LIBRARY=/opt/local/lib/libi conv.dylib -DPROJ_INCLUDE_DIR=/opt/local/include -DPROJ_LIBRARY=/opt/local/lib/libproj.dylib -DOPENSSL_INCLUDE_DIR=/opt/local/include -DOPENSSL_LIBRARIES=/opt/local/lib/libssl.dyl ib -DPYTHON_INCLUDE_PATH=/opt/local/Library/Frameworks/Python.framework/Headers -DPYTHON_EXECUTABLE=/opt/local/bin/python -DPYUIC4_PROGRAM=/opt/local/bin/pyuic4-2.6 -DPYRCC4_PROGR AM=/opt/local/bin/pyrcc4-2.6 -DSIP_BINARY_PATH=/opt/local/Library/Frameworks/Python.framework/Versions/2.6/bin/sip -DSIP_INCLUDE_DIR=/opt/local/Library/Frameworks/Python.framework /Headers -DQT_QT_INCLUDE_DIR=/opt/local/include -DQT_ZLIB_LIBRARY=/opt/local/lib/libz.dylib -DQT_PNG_LIBRARY=/opt/local/lib/libpng.dylib -DCMAKE_BUILD_TYPE=Release -DSVN_MARKER= /usr/bin/svnversion -DCMAKE_OSX_ARCHITECTURES="x86_64" " returned error 1 :error:configure Target org.macports.configure returned: configure failure: shell command failed (see log for details) :debug:configure Backtrace: configure failure: shell command failed (see log for details) while executing "$procedure $targetname" :info:configure Warning: the following items did not execute (for qgis): org.macports.activate org.macports.configure org.macports.build org.macports.destroot org.macports.install :notice:configure Log for qgis is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_gis_qgis/main.log
Which is strange as 1) FindSIP.py seems to use python 2.6 and 2) py26-sip @4.12.1_0 is installed on my system.
I'm using Mac OS 10.6.6 and Xcode 3.2.5.
Change History (14)
comment:1 Changed 14 years ago by ryandesign (Ryan Carsten Schmidt)
Owner: | changed from macports-tickets@… to vince@… |
---|---|
Port: | qgis added |
Summary: | qgis @1.6.0: cannot install fcgi dependency, then fails again → qgis @1.6.0: ImportError: No module named sipconfig |
comment:2 Changed 14 years ago by Veence (Vincent)
comment:4 Changed 14 years ago by Veence (Vincent)
And if you import sipconfig manually ?
python >>> import sipconfig
what is the result?
comment:5 Changed 14 years ago by barthelemy@…
sipconfig is available to macport's python but not to mac os version.
$ sudo python Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sipconfig Traceback (most recent call last): File "<stdin>", line 1, in <module> ImportError: No module named sipconfig
$ sudo which python /opt/local/bin/python
$ ls -l /opt/local/bin/python lrwxr-xr-x 1 root admin 18B 2 jui 2010 /opt/local/bin/python -> /usr/bin/python2.6
$ sudo /opt/local/bin/python2.6 Python 2.6.6 (r266:84292, Dec 24 2010, 09:40:51) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import sipconfig >>>
Should I run sudo python_select python26
? Or should qgis explicitly call macport's version?
When I use python, I either call directly python26 or put
alias python='python2.6'
in my bashrc. I never messed with python_select.
comment:6 Changed 14 years ago by Veence (Vincent)
{{{$ ls -l /opt/local/bin/python lrwxr-xr-x 1 root admin 18B 2 jui 2010 /opt/local/bin/python -> /usr/bin/python2.6 }}}
This is plain wrong. It means that one of your python has somehow been installed not in the Macports tree, but in the system tree. As you see, when you invoke python via python
you get another version that when you type /opt/local/bin/python2.6
. Besides, there is no need to use sudo
to launch executables; on the contrary, it defeats the superuser protection mechanism. You must clean that before going on.
comment:7 Changed 14 years ago by barthelemy@…
Hi,
vince said:
This is plain wrong. It means that one of your python has somehow been installed not in the Macports tree, but in the system tree.
I think this is the one installed by Apple, together with mac os. Don't you have the same? If not, can you detail why it is wrong?
$ cat /opt/local/etc/select/python/python26-apple /usr/bin/python2.6 /usr/bin/pythonw2.6 /usr/bin/python2.6-config - /usr/bin/pydoc2.6 /usr/bin/smtpd2.6.py - /usr/share/man/man1/python2.6.1.gz
I don't know what this file is, and what its content means.
But it might suggest that the /usr/bin/python2.6
is
indeed from Apple.
vince said::
As you see, when you invoke python via python you get another version that when you type
/opt/local/bin/python2.6
.
What's wrong with that? Moreover, I also have python 2.7 and 3.2 installed (from macport).
vince said:
Besides, there is no need to use sudo to launch executables; on the contrary, it defeats the superuser protection mechanism.
The problem is not with the version of python my user uses, but with the one port uses during qgis setup. As I run port through sudo, I think I need to use sudo here to get meaningful information.
By the way, because of my bashrc plays, I would not be the same version:
$ python Python 2.6.6 (r266:84292, Dec 24 2010, 09:40:51) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> $ sudo python Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>>
vince said:
You must clean that before going on.
I don't think there is anything wrong with my current setup. So I don't know what and how I should clean.
Do you have a link to some documentation about the clean way?
By the way, thank you a lot for your help.
PS: there is also the problem with the fcgi dependency
comment:8 follow-up: 9 Changed 14 years ago by Veence (Vincent)
You right, python 2.6.1 is the Apple one. It has probably been installed by an update (Basic SL comes with 2.5 only, if I remember)
What is wrong is that /opt/local/bin/python
should not be pointing to /usr/bin/python
, but /opt/local/bin/python2.6
. Try using python_select python2.6
, it should clean up and give you a correct configuration.
comment:9 Changed 14 years ago by barthelemy@…
Replying to vince@…:
What is wrong is that
/opt/local/bin/python
should not be pointing to/usr/bin/python
, but/opt/local/bin/python2.6
. Try usingpython_select python2.6
, it should clean up and give you a correct configuration.
I think this would be a workaround, but not a solution.
Have you some authoritative documentation supporting that my current setup is wrong or incorrect? (I could not find any).
My current setup is python_select's default so I doubt it is wrong.
Moreover, the point of python_select is to choose the current, system-wide python version. I may prefer or need python32 or python25, and qgis would then fail again.
I think the problem lies within qgis which should 1) build-depend on py26-sip (why is not sip a dependency?) 2) call the good python version without relying on users' tastes
Does it sound ok to you?
comment:10 follow-up: 11 Changed 14 years ago by Veence (Vincent)
I propose you ask the people responsible for python ports about your configuration. Just post a mail to macports-dev@… and ask if this is right or wrong. I'll follow the thread and act accordingly. Cheers Vincent
comment:11 Changed 14 years ago by barthelemy@…
Replying to vince@…:
I propose you ask the people responsible for python ports about your configuration. Just post a mail to macports-dev@… and ask if this is right or wrong.
For future reference, the thread is: http://lists.macosforge.org/pipermail/macports-dev/2011-March/014070.html
regards
comment:12 follow-up: 13 Changed 14 years ago by Veence (Vincent)
I have committed r76805 that features several enhancements, especially Python related ones. You should now specify a +pythonXX option (25, 26, 27, 30, 31) and it builds against the specified version rather than the default. I have also bumped qwt to 5.2.
Some tweaks are to be made, but please update, test and tell me.
comment:13 Changed 14 years ago by barthelemy@…
Replying to vince@…:
but please update, test and tell me.
I tested with python27. It worked, thank you!
I then uninstalled qgis and its dependencies to reproduce the fcgi-related problem. I could not reproduce it, it worked again!
I also finally understood that py27-sip was a dependency of py27-pyqt4.
So I do not have any concern anymore. Thank you again.
comment:14 Changed 14 years ago by Veence (Vincent)
Resolution: | → fixed |
---|---|
Status: | new → closed |
No problem, my pleasure. Have fun, à la prochaine !
What is the output of python -V?