Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol: PyUnicodeUCS2_FromStringAndSize #73

Closed
jingydz opened this issue Jan 13, 2021 · 3 comments
Closed

undefined symbol: PyUnicodeUCS2_FromStringAndSize #73

jingydz opened this issue Jan 13, 2021 · 3 comments

Comments

@jingydz
Copy link

jingydz commented Jan 13, 2021

Hello, I encountered some errors while running this package.

ImportError: /home/zhangjj/software/miniconda3/envs/SVE/lib/python2.7/site-packages/bx/bbi/bigwig_file.so: undefined symbol: PyUnicodeUCS2_FromStringAndSize

I searched some solutions to deal with it. I guess the bx-python package requires the pyunicode version to be UCS2, but my python(2.7.9) is ucs4.

`>>> import sys

print sys.maxunicode
1114111`

1114111 represents UCS4 and 65535 represents UCS2.
So I try to change the PyUnicode of my python(2.7.9).

wget https://www.python.org/ftp/python/2.7.9/Python-2.7.9.tgz tar -zxvf Python-2.7.9.tgz cd Python-2.7.9 ./configure --enable-unicode=ucs2 make make install

I know the default unicode is ucs2 in the configure step, but I still use it.
In the previous python version, I use conda to create a python(executable file) from a py2.7 environment, so I got the unicode ucs4.
Finally, it failed. Then I tried another solution:
$pip install bx-python==0.7.2 DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. pip 21.0 will drop support for Python 2.7 in January 2021. More details about Python 2 support in pip can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support pip 21.0 will remove support for this functionality. Collecting bx-python==0.7.2 Using cached bx-python-0.7.2.tar.gz (939 kB) ERROR: Command errored out with exit status 1: command: /home/zhangjj/software/miniconda3/envs/SVE/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-HY8Kf3/bx-python/setup.py'"'"'; __file__='"'"'/tmp/pip-install-HY8Kf3/bx-python/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-wqOwLI cwd: /tmp/pip-install-HY8Kf3/bx-python/ Complete output (24 lines): Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.35.tar.gz Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-HY8Kf3/bx-python/setup.py", line 9, in <module> use_setuptools() File "distribute_setup.py", line 152, in use_setuptools return _do_download(version, download_base, to_dir, download_delay) File "distribute_setup.py", line 131, in _do_download to_dir, download_delay) File "distribute_setup.py", line 201, in download_setuptools src = urlopen(url) File "/home/zhangjj/software/miniconda3/envs/SVE/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/home/zhangjj/software/miniconda3/envs/SVE/lib/python2.7/urllib2.py", line 437, in open response = meth(req, response) File "/home/zhangjj/software/miniconda3/envs/SVE/lib/python2.7/urllib2.py", line 550, in http_response 'http', request, response, code, msg, hdrs) File "/home/zhangjj/software/miniconda3/envs/SVE/lib/python2.7/urllib2.py", line 475, in error return self._call_chain(*args) File "/home/zhangjj/software/miniconda3/envs/SVE/lib/python2.7/urllib2.py", line 409, in _call_chain result = func(*args) File "/home/zhangjj/software/miniconda3/envs/SVE/lib/python2.7/urllib2.py", line 558, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 403: SSL is required ---------------------------------------- ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

@wangyugui
Copy link

Should bx.python support UCS2 and UCS4, and then use the current one used by python3?

@nsoranzo
Copy link
Collaborator

nsoranzo commented Mar 7, 2021

The latest bx-python dropped support for Python 2.7, which is deprecated upstream. Please re-open if this is still an issue on Python 3.

@nsoranzo nsoranzo closed this as completed Mar 7, 2021
@VirginieJJ
Copy link

hello,
Sorry to re-open an old post, but it can be usefull for some people using python27. I had the same problem to install a specific tool. After few hours of tries, I solved it using the command :
conda install -c conda-forge -c bioconda bx-python
Have a nice day !
Virginie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants