#12369: Split python25 into python25-core and modules ---------------------------------+------------------------------------------ Reporter: nirs@actcom.net.il | Owner: mww@macports.org Type: defect | Status: reopened Priority: Normal | Milestone: Port Enhancements Component: ports | Version: Resolution: | Keywords: ---------------------------------+------------------------------------------ Comment(by sasha@theotheralex.com): I'm attempting to use virtualenv under python25. I followed the instructions in this ticket and installed py25-hashlib. But virtualenv --no-site-packages errors out with the error bellow. I believe the reason is the the copy of python executable copied to the new environment by the virtualenv script only has access to hashlib.py that's part of the crippled python25 port and not to the hashlib that's installed as part of the py25-hashlib port. is there a way around this? {{{ New python executable in ./bin/python Installing setuptools........... Complete output from command ./bin/python -c "#!python \"\"\"Bootstrap setuptoo... " /opt/local/Library/Frameworks/...5.egg: Traceback (most recent call last): File "<string>", line 267, in <module> File "<string>", line 226, in main File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /site-packages/virtualenv-1.2-py2.5.egg/support- files/setuptools-0.6c8-py2.5.egg/setuptools/command/easy_install.py", line 21, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5 /site-packages/virtualenv-1.2-py2.5.egg/support- files/setuptools-0.6c8-py2.5.egg/setuptools/package_index.py", line 3, in <module> File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/urllib2.py", line 91, in <module> import hashlib ImportError: No module named hashlib ---------------------------------------- ...Installing setuptools...done. Traceback (most recent call last): File "/opt/local/Library/Frameworks/Python.framework/Versions/2.5/bin/virtualenv", line 8, in <module> load_entry_point('virtualenv==1.2', 'console_scripts', 'virtualenv')() File "/opt/local/lib/python2.5/site- packages/virtualenv-1.2-py2.5.egg/virtualenv.py", line 389, in main unzip_setuptools=options.unzip_setuptools) File "/opt/local/lib/python2.5/site- packages/virtualenv-1.2-py2.5.egg/virtualenv.py", line 638, in create_environment install_setuptools(py_executable, unzip=unzip_setuptools) File "/opt/local/lib/python2.5/site- packages/virtualenv-1.2-py2.5.egg/virtualenv.py", line 282, in install_setuptools cwd=cwd) File "/opt/local/lib/python2.5/site- packages/virtualenv-1.2-py2.5.egg/virtualenv.py", line 450, in call_subprocess % (cmd_desc, proc.returncode)) OSError: Command ./bin/python -c "#!python \"\"\"Bootstrap setuptoo... " /opt/local/Library/Frameworks/...5.egg failed with error code 1 }}} Replying to [ticket:12369 nirs@…]:
{{{ $ python2.5 Python 2.5.1 (r251:54863, Jul 29 2007, 14:28:00) [GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin Type "help", "copyright", "credits" or "license" for more information.
import sha Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/opt/local/lib/python2.5/sha.py", line 6, in <module> from hashlib import sha1 as sha File "/opt/local/lib/python2.5/hashlib.py", line 133, in <module> md5 = __get_builtin_constructor('md5') File "/opt/local/lib/python2.5/hashlib.py", line 60, in __get_builtin_constructor import _md5 ImportError: No module named _md5
}}}
sha is important core module, many apps will break without it.
There was no problem with Python 2.5.0.
Environment: Mac OS X 10.4.8
-- Ticket URL: <http://trac.macports.org/ticket/12369#comment:17> MacPorts <http://www.macports.org/> Ports system for Mac OS