ksamuk / pixy

Software for painlessly estimating average nucleotide diversity within and between populations
https://pixy.readthedocs.io/
MIT License
115 stars 14 forks source link

installation error #90

Closed jingydz closed 9 months ago

jingydz commented 9 months ago

Command

$ conda install -c conda-forge pixy UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:

Specifications:

Your python: python=3.9

If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.

The following specifications were found to be incompatible with your system:

Your installed version is: 2.17

Command

$ conda install -c bioconda htslib All requested packages already installed.

Command

$ pixy --help -bash: pixy: command not found

Question

this software didn't support python 3.9?

ksamuk commented 9 months ago

That's correct, can you try the below and see if that solves this error?

conda create --name pixy -c anaconda python=3.8.17
conda activate pixy
conda install -c conda-forge pixy
conda install -c bioconda htslib
BioLaFu commented 9 months ago

Hey, I got the same error:

conda install -c conda-forge pixy

UnsatisfiableError: The following specifications were found to be incompatible with the existing python installation in your environment:

Specifications:

Your python: python=3.9

If python is on the left-most side of the chain, that's the version you've asked for. When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.

The following specifications were found to be incompatible with your system:

Your installed version is: 2.35

Then I installed a new conda environment with python 3.8.18:

conda create --name python-for-pixy python=3.8

conda activate python-for-pixy

conda install -c conda-forge pixy conda install -c bioconda htslib

pixy --help

and get back a different error:

Traceback (most recent call last): File "/home/fuchsl/anaconda3/envs/python-for-pixy/bin/pixy", line 7, in from pixy.main import main File "/home/fuchsl/anaconda3/envs/python-for-pixy/lib/python3.8/site-packages/pixy/main.py", line 6, in import allel File "/home/fuchsl/anaconda3/envs/python-for-pixy/lib/python3.8/site-packages/allel/init.py", line 5, in from .model.chunked import * File "/home/fuchsl/anaconda3/envs/python-for-pixy/lib/python3.8/site-packages/allel/model/chunked.py", line 24, in from allel import chunked as _chunked File "/home/fuchsl/anaconda3/envs/python-for-pixy/lib/python3.8/site-packages/allel/chunked/init.py", line 52, in import h5py as _h5py File "/home/fuchsl/anaconda3/envs/python-for-pixy/lib/python3.8/site-packages/h5py/init.py", line 46, in from ._conv import register_converters as _register_converters File "h5py/h5t.pxd", line 14, in init h5py._conv File "h5py/h5t.pyx", line 293, in init h5py.h5t File "/home/fuchsl/anaconda3/envs/python-for-pixy/lib/python3.8/site-packages/numpy/init.py", line 320, in getattr raise AttributeError("module {!r} has no attribute " AttributeError: module 'numpy' has no attribute 'typeDict'

Can you help out please?

BioLaFu commented 9 months ago

Never mind, fixed it by doing this: pip install numpy --upgrade python -m pip install --user --upgrade h5py

jingydz commented 9 months ago

Never mind, fixed it by doing this: pip install numpy --upgrade python -m pip install --user --upgrade h5py

yes, I installed it successfully. conda create --name pixy -c anaconda python=3.8.17 conda activate pixy conda install -c conda-forge pixy conda install -c bioconda htslib pip install numpy --upgrade python -m pip install --user --upgrade h5py pixy usage: pixy [-h] --stats {pi,dxy,fst} [{pi,dxy,fst} ...] --vcf [VCF] --populations [POPULATIONS] [--window_size [WINDOW_SIZE]] [--bed_file [BED_FILE]] [--n_cores [N_CORES]] [--output_folder [OUTPUT_FOLDER]] [--output_prefix [OUTPUT_PREFIX]] [--chromosomes [CHROMOSOMES]] [--interval_start [INTERVAL_START]] [--interval_end [INTERVAL_END]] [--sites_file [SITES_FILE]] [--chunk_size [CHUNK_SIZE]] [--fst_type {wc,hudson}] [--bypass_invariant_check {yes,no}] [--version] [--citation] [--silent] pixy: error: the following arguments are required: --stats, --vcf, --populations