jjfarrell / hla-genotyper

HLA-Genotyper is a python software tool to call 4-digit HLA genotypes from RNA and DNA sequencing data stored in bam files.
MIT License
8 stars 2 forks source link

Error during installation #4

Open GreeshmaThulasi opened 8 months ago

GreeshmaThulasi commented 8 months ago

I am using Windows OS. I got a long error while installing. `C:\Windows\System32>pip install --user hla-genotyper Collecting hla-genotyper Using cached hla-genotyper-0.4.2b1.tar.gz (2.7 MB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [17 lines of output] Traceback (most recent call last): File "C:\Users\grees\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\grees\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) File "C:\Users\grees\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) File "C:\Users\grees\AppData\Local\Temp\pip-build-env-26i7xpzc\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) File "C:\Users\grees\AppData\Local\Temp\pip-build-env-26i7xpzc\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires self.run_setup() File "C:\Users\grees\AppData\Local\Temp\pip-build-env-26i7xpzc\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup super(_BuildMetaLegacyBackend, self).run_setup(setup_script=setup_script) File "C:\Users\grees\AppData\Local\Temp\pip-build-env-26i7xpzc\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 18, in NameError: name 'execfile' is not defined [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.`

Please help me in troubleshooting.

jjfarrell commented 8 months ago

I have only tested the tool on a linux system.  Could you try running pip install wheel to see if that helps?

Another approach to get around this, is to run in from a virtual linux image with Docker. Install docker on your windows system and start up the virtual linux image and then do the pip install.   The software was developed on Centos but other linux distros should work. 

I will put it on my to-do list to put a hla-genotyper docker image on the docker hub to make the process more streamlined. 

GreeshmaThulasi commented 8 months ago

I can try in my Ubuntu. Can you please explain how to install it in Ubuntu?

GreeshmaThulasi commented 8 months ago

I have tried in Ubuntu OS. Getting an error, Downloads/hla-genotyper-0.4.2b1$ python3 setup.py Traceback (most recent call last): File "/home/greeshma/Downloads/hla-genotyper-0.4.2b1/setup.py", line 18, in <module> execfile("hla/version.py") NameError: name 'execfile' is not defined Please help to resolve the issue.

jjfarrell commented 8 months ago

The hla-genotype software was developed using python2. Could you check if python2 works for you?

You can switch easily between python 2 and 3 with a virtual env like anaconda or miniconda:

https://docs.anaconda.com/anaconda/user-guide/tasks/switch-environment/ https://docs.conda.io/en/latest/miniconda.html

GreeshmaThulasi commented 8 months ago

My ubuntu OS is installed as VirtualBox and Windows is my primary OS. Is there any issue in that?

jjfarrell commented 8 months ago

Should not be but it is important to use python 2 and not python 3.

GreeshmaThulasi commented 8 months ago

I am using WSL in my Windows OS now. Because my Ubuntu OS crashed. WSL have python 2.7. easy install and pip install are not working for me. I have downloaded hla-genotyper-0.4.2b1.tar.gz. Hence I used the following code, (py2) greeshma@INBookX1Pro:~$ /mnt/c/Users/grees/Downloads/hla-genotyper/hla-genotyper-0.4.2b1/setup.py Traceback (most recent call last): File "/mnt/c/Users/grees/Downloads/hla-genotyper/hla-genotyper-0.4.2b1/setup.py", line 18, in <module> execfile("hla/version.py") IOError: [Errno 2] No such file or directory: 'hla/version.py' why this showing version.py doesn't exist?

GreeshmaThulasi commented 8 months ago

I have executed the following command in WSL, PS C:\Users\grees> pip install --user hla-genotyper and got error messages as, `Collecting hla-genotyper Using cached hla-genotyper-0.4.2b1.tar.gz (2.7 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

× python setup.py egg_info did not run successfully. │ exit code: 1 ╰─> [6 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\grees\AppData\Local\Temp\pip-install-7hrrvfh1\hla-genotyper_d625d058dae8415b8ba283813e5748dd\setup.py", line 18, in execfile("hla/version.py") NameError: name 'execfile' is not defined [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

× Encountered error while generating package metadata. ╰─> See above for output.`

please help me to resolve the issue.

jjfarrell commented 8 months ago

https://stackoverflow.com/questions/6357361/alternative-to-execfile-in-python-3

Execfile was dropped in python 3. It still looks less like python 3 is being run. Check what the default python version is.

GreeshmaThulasi commented 8 months ago

I fixed that error. Getting a new error. when I run hla-genotyper, it says biopython is needed. I installed biopython. I think biopython supports python3? Since it's been installed in location, /home/greeshma/.local/lib/python3.10/site-packages (1.83). But still the error exists as, (py2) greeshma@INBookX1Pro:/mnt/c/Users/grees/Downloads/hla-genotyper-0.4.2b1/hla-genotyper-0.4.2b1$ hla-genotyper Traceback (most recent call last): File "/home/greeshma/miniconda3/envs/py2/bin/hla-genotyper", line 6, in <module> from pkg_resources import load_entry_point File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3251, in <module> @_call_aside File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside f(*args, **kwargs) File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master ws.require(__requires__) File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'biopython' distribution was not found and is required by hla-genotyper. How can I fix this?

GreeshmaThulasi commented 8 months ago

hla-genotyper is installed and biopython is installed in python2. When I run hla-genotyper, the error comes as, (py2) @.***:/mnt/c/Users/grees/Downloads/hla-genotyper-0.4.2b1/hla-genotyper-0.4.2b1$ hla-genotyper Traceback (most recent call last): File "/home/greeshma/miniconda3/envs/py2/bin/hla-genotyper", line 6, in

from pkg_resources import load_entry_point File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3251, in @_call_aside File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3235, in _call_aside f(*args, **kwargs) File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 3264, in _initialize_master_working_set working_set = WorkingSet._build_master() File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 583, in _build_master ws.require(__requires__) File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 900, in require needed = self.resolve(parse_requirements(requirements)) File "/home/greeshma/miniconda3/envs/py2/lib/python2.7/site-packages/pkg_resources/__init__.py", line 786, in resolve raise DistributionNotFound(req, requirers) pkg_resources.DistributionNotFound: The 'biopython' distribution was not found and is required by hla-genotyper Please help me to resolve this issue. On Fri, Feb 2, 2024 at 6:11 PM jjfarrell ***@***.***> wrote: > > https://stackoverflow.com/questions/6357361/alternative-to-execfile-in-python-3 > > Execfile was dropped in python 3. It still looks less like python 3 is > being run. Check what the default python version is. > > — > Reply to this email directly, view it on GitHub > , > or unsubscribe > > . > You are receiving this because you authored the thread.Message ID: > ***@***.***> > -- *Greeshma Thulasi* *Bioinformatician* *1-STOP CENTRE MIDLANDS PARK 3RD FLOOR488D-3-15, JALAN BURMA, 10350 PENANG, MALAYSIAConfidentiality Notice:This email, including any attachments, is the property of the Cytogenomix and is intended for the sole use of the intended recipient(s). It may contain information that is proprietary and confidential. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, please delete this message and reply to the sender regarding the error in a separate email.*
jjfarrell commented 8 months ago

All the python modules also need to be python 2.

Old Releases Recent releases of Biopython require NumPy (and not Numeric). Version 1.76 is the last release to support Python 2.7 and 3.5, all later releases require Python 3.6 or greater:

So Biopython version 1.76 would need to be installed.

GreeshmaThulasi commented 8 months ago

Ok, thanks for the clarification.

On Tue, Feb 6, 2024 at 5:59 PM jjfarrell @.***> wrote:

All the python modules also need to be python 2.

Old Releases Recent releases of Biopython require NumPy (and not Numeric). Version 1.76 is the last release to support Python 2.7 and 3.5, all later releases require Python 3.6 or greater:

So Biopython version 1.76 would need to be installed.

— Reply to this email directly, view it on GitHub https://github.com/jjfarrell/hla-genotyper/issues/4#issuecomment-1929426173, or unsubscribe https://github.com/notifications/unsubscribe-auth/AGY4AZS6HW5JLHLBTEDQRSTYSIO2LAVCNFSM6AAAAABCOKEBHWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSMRZGQZDMMJXGM . You are receiving this because you authored the thread.Message ID: @.***>

-- Greeshma Thulasi Bioinformatician

1-STOP CENTRE MIDLANDS PARK 3RD FLOOR488D-3-15, JALAN BURMA, 10350 PENANG, MALAYSIAConfidentiality Notice:This email, including any attachments, is the property of the Cytogenomix and is intended for the sole use of the intended recipient(s). It may contain information that is proprietary and confidential. Any unauthorized review, use, disclosure, or distribution is prohibited. If you are not the intended recipient, please delete this message and reply to the sender regarding the error in a separate email.