We've installed mercurial 1.4.1 and python 2.6.2 on a solaris 8 box. Now some hg commands work as expected, others fail.
I was able to initialize a repository (hg init) and add a file (hg add) but the committing (hg commit) leads to an error message:
abort: could not import module found!
I need a hint where to look - I'm not a python expert, is this missing found module part of the python distribution or does it belong to mercurial? Any idea how to fix it?
Edit
Thanks for your comments - hg debuginstall runs fine, just reports one problem - I didn't set a username in any of the config files. Can't believe that this causes the actual problems...
Edit
--traceback was a good hint!!
Here's the last line (can't copy&paste):
ImportError: ld.so.1: hg: fatal: relocation error:
file:/usr/local/lib/python2.6/lib-dynload/zlib.so:
symbol inflateCopy: referenced symbol not found
The zlib.so library is present was installed with either the python or mercurial package.
Looks like I'm not the only one: here's the same problem with python 2.5 on solaris 10
You need to install the zlib library for your system (libz.so).
Check your LD_LIBRARY_PATH settings.
If it is pulling libz from an odd place you will need to fix it so that it is pulling from /pkg/local/lib first
I was seeing this:
ldd /pkg/local/lib/python2.7/lib-dynload/zlib.so
libz.so => /import/wgs/lib/libz.so
But now its working for me.
Related
A couple of days ago I cloned a git repository and tried to make a build out of that code with PyBuilder; however, I have not been able to do so.
Every time I run pyb -X -E jenkins-zipfile-release in Bash I get the following error: BUILD FAILED - Error initializing ctypes. The thing is, none of my colleagues have this problem, we don't know why.
The traceback tells me the problem is here: .../pyenv/versions/2.7.14/lib/python2.7/site-packages/oscrypto/_openssl/_libcrypto_ctypes.py
We thought the problem that my python was not correctly compiled with SSL. We even had a different SSL version. I replaced LibreSSL with OpenSSL, but the problem persists.
Another person told me that maybe the oscrypto libraries are conflicting (one from the environment and the other one from the project's lib directory) How can I check that?
I would deeply appreciate if someone could point me in the right direction, I've been trying for two days now.
There was an issue with regards to running oscrypto in a High Sierra. The issue was fixed and it will be a part of the next release.
More info: https://github.com/wbond/oscrypto/issues/22
I've just installed MySQL on my 10.10.1 MAC, and I'm trying to link it to Python. However I get this error when I'm trying to import the package.
import MySQLdb as mdb
File "build/bdist.macosx-10.5-x86_64/egg/MySQLdb/__init__.py", line 19, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/_mysql.py", line 7, in <module>
File "build/bdist.macosx-10.5-x86_64/egg/_mysql.py", line 6, in __bootstrap__
ImportError: dlopen(/Users/ME/.python-eggs/MySQL_python-1.2.5-py2.7-macosx-10.5-x86_64.egg-tmp/_mysql.so, 2): Library not loaded: libssl.1.0.0.dylib
Referenced from: /Users/ME/.python-eggs/MySQL_python-1.2.5-py2.7-macosx-10.5-x86_64.egg-tmp/_mysql.so
Reason: image not found
[Finished in 0.2s with exit code 1]
I have no idea what "Image not found" means, or how to solve this.
MySQL is connected to the server in the background, and I installed the package through the terminal window using: easy_install MySQL-python
Any suggestions on where I went wrong?
Check where your _mysql.so is linking to:
otool -L /Library/Python/2.7/site-packages/_mysql.so
In my case I built the mysql source in /tmp/ and once
tmp cleaned up my dylib went away. I never re-linked to a
reliable location like /Applications/MAMP/Library/lib where
my mysql libraries live (because I copied them here after the build).
So I went back and rebuilt everything and made sure to run the command to
update the package link to the correct dylib:
sudo install_name_tool -change <temp file location>/mysql-5.5.29/libmysql/libmysqlclient.18.dylib /Applications/MAMP/Library//lib/libmysqlclient.18.dylib /Library/Python/2.7/site-packages/_mysql.so
I followed the setup found here:
http://dreamconception.com/tech/how-to-install-mysqldb-mysql-python-on-mamp/
NOTE: That I didn't need to do the step regarding changing the configure.cmake
file. When I looked at the configure.cmake file it made sense to me so I ran
it as-is and it worked.
Also note your libmysqlclient.<num>.dylib might be something different so
do a find . -name "libmysqlclient.*.dylib" to get the right one
Now re-run the otool command and see that the linking was updated.
References (and other solutions):
Python import MySQLdb error - Mac 10.6
http://dreamconception.com/tech/how-to-install-mysqldb-mysql-python-on-mamp/
The solution to the problem can be found in this link Python: MySQLdb and "Library not loaded: libmysqlclient.16.dylib"
_mysql.so refers to libmysqlclient.16.dylib. That is, the shared library that serves as the bridge between Python and the MySQL client library, _mysql.so, refers to the dynamic library for the MySQL client library, and that library cannot be loaded for some reason.
Questions you need to answer:
Is there a libmysqlclient.16.dylib anywhere on your system? If not, you need to install the MySQL client software.
If so, is the directory containing that library in your DYLD_LIBRARY_PATH setting? If not, try adding it.
If so, you'll have to ensure that the libmysqlclient.16.dylib file is not corrupt. My copy, installed in /opt/local/lib/mysql5/mysql/libmysqlclient.16.dylib, courtesy of MacPorts, has MD5 signature c79ee91af08057dfc269ee212915801a and is 1,462,376 bytes in size. What does your copy look like?
I'm trying to install and configure pyIpopt. Ipopt is already installed and the examples run fine.
From the shell, when I do import pyIpopt, I get the error:
ImportError: /***PATH***/libipopt.so.1: undefined symbol: MPI_Init
The FAQ section of the pyIpopt git project has this to offer for these kinds of errors:
Do a Google search to find the library file, and add
-lWhateverLibrary in the makefile of pyipopt.
I've googled and found this: http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Init.html.
I don't know how to get the library or add it to the makefile... Any assistance would be much appreciated!
Just had a similar problem on ubuntu.
Using libmumps-seq worked for me:
installed libmumps-seq-4.9.2 (just with apt-get, along side the ordinary libmumps)
in setup.py changed in the libraries list argument 'coinmumps' to 'dmumps_seq-4.9.2'
rebuilt and installed.
If I understand it correctly, the default mumps is distributed (using MPI lib which can be a world of pain), and all i needed is the sequential one, which mumps-seq provides.
I am getting this error when trying to run a classic python code written by x-colleagues.
Can u anyone help me out with solving this issue. I have googled throughly and couldn't find any solution.
Python version : 2.4.3
ImportError: /usr/lib/python2.4/lib-dynload/pyexpat.so: symbol XML_SetHashSalt, version EXPAT_1_95_8_RH not defined in file libexpat.so.0 with link time reference
I got the same problem and the root cause for me is that i built libexpat myself from source but pyexpat.so seems to depand on RH customized libexpat version.
So check your dependencies with:
ldd /usr/lib/python2.4/lib-dynload/pyexpat.so
Then check your libexpat.so file. If possible, you can try to re-install the rpm of expat-devel.x86_64 (for 64 bit).
yum install expat-devel.x86_64
I am using Python 2.6.1 and I want to connect to MySQLdb, I installed mySQL in my system, and I am trying to connect MySQL-python-1.2.2.win32-py2.6 from http://www.codegood.com/archives/4 site but its not working
while running my application its saying that No module named MySQLdb
please any one provide me the proper setup for MySQLdb.
thanks in advance
The best setup for Windows that I've found:
http://www.codegood.com/downloads?dl_cat=2
EDIT: Removed original link (it's an ad farm now :( )
The module is not likely in your python search path..
Check to see if that module is in your Python Path... In windows...you may find it in the registry
HKLM\Software\Python\PythonCore\2.6\PythonPath
Be careful editing it...
You may also alter the Python Path programmaticly by the following
import sys
sys.path.append('somepath_to_the_module_you_wanted')
import the_module_you_wanted
Hope that helps
I was having this problem and then I realised I was importing MySQLdb erroneously - it's case sensitive:
Incorrect: >>>import mysqldb
Correct: >>>import MySQLdb
Silly mistake, but cost me a few hours!
generally, (good) python modules provide a 'setup.py' script that takes care of things like proper installation (google for 'distutils python'). MySQLdb is a "good" module in this sense.
since you're using windows, things might be a bit more complex. I assume you already installed MySQLdb following the instructions and it still gives this problem. what I would do is open a cmd.exe window, cd to the directory containing the 'setup.py' script and there type something like
C:\Python26\Python.exe setup.py install
if this does not work, then grab the module somewhere else, maybe at the place where it is actively developed: http://sourceforge.net/projects/mysql-python/
See this post on the mysql-python blog: MySQL-python-1.2.3 beta 2 released - dated March 2009. Looks like MySQLdb for Python 2.6 is still a work in progress...
I went for compiled binary , thats the best way to go on windows. There is a good source maintained by someone.
I wrote about it here before because some months down the lane I will forget how I solved this and be searching Stack again :/
http://vangel.3ezy.com/archives/101-Python-2.4-2.5-2.6-and-2.7-Windows-MySQLdb-python-installation.html