-
Notifications
You must be signed in to change notification settings - Fork 104
Cython compiler error when installing/building cDNA_cupcake #241
Comments
I just noticed that there was a that was a PR submitted to address the issue here: |
I ran into a few other issues while installing cDNA_Cupcake. I will describe each of them below:
To fix this issue, I replaced TLDR mkdir -p /opt2/cdna_cupcake/28.0.0/ \
&& wget https://github.com/Magdoll/cDNA_Cupcake/archive/refs/tags/v28.0.0.tar.gz -O /opt2/cdna_cupcake/28.0.0/v28.0.0.tar.gz \
&& tar -zvxf /opt2/cdna_cupcake/28.0.0/v28.0.0.tar.gz -C /opt2/cdna_cupcake/28.0.0/ \
&& rm -f /opt2/cdna_cupcake/28.0.0/v28.0.0.tar.gz \
&& cd /opt2/cdna_cupcake/28.0.0/cDNA_Cupcake-28.0.0 \
# Patch: some pyx files contain python2,
# need to specify the langauage_level as
# py2 otherwise it defaults to py3.
&& sed -i 's/cythonize(ext_modules)/cythonize(ext_modules, language_level = "2")/' setup.py \
# sklearn is depreciated, use scikit-learn instead
&& sed -i 's/sklearn/scikit-learn/' setup.py \
# numpy, np.int is depreciated, use int instead:
# https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
&& find /opt2/cdna_cupcake/28.0.0/cDNA_Cupcake-28.0.0 \
-type f -exec grep 'np\.int' {} /dev/null \; 2> /dev/null \
| awk -F ':' -v q="'" -v b='\\' '{print "sed -i", q"s/np"b".int"b"("b"s"b"|$"b")/np.int_/g"q,$1}' \
| sort \
| uniq \
| bash \
&& python setup.py build \
&& python setup.py install
export PATH="${PATH}:/opt2/cdna_cupcake/28.0.0/cDNA_Cupcake-28.0.0/sequence" |
Hello there,
I hope you're having an awesome day, and that all is going well on our side. I just wanted to reach out to you because I ran into an issue when installing/building cDNA_cupcake using the instructions that you have provided. I am installing/building cDNA_cupcake to use with sqanti3 with
python/3.10.6
.Here is the command I am running to install
cDNA_Cupcake/v28.0.0
:And here is the error message/traceback I get when running the command above:
It appears this pyx script,
cupcake/tofu/branch/c_branch.pyx
, contains python2 syntax. The warning the compiler is giving above before the traceback states that because the Compiler language_level directive is not set, it is defaulting to python3:This is causing the compiler to error out when it reaches the python2 style print statement. Can you please fix this on your side when you have a moment of free time? I also noticed this issue is documented/described here in at sqanti3. For the time being, I am going to patch the setup.py similar to what is described in the sqanti issue.
Thank you again for your time, and have a great day!
Best regards,
@skchronicles
The text was updated successfully, but these errors were encountered: