bvalot / pyMLST

whole genome MLST analysis

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrade support python version

dgslos opened this issue · comments

Hi,

It seems pyMLST throw an error after being installed in a conda environment with pip.

Traceback (most recent call last):
    File "/opt/anaconda3/envs/pymlst/lib/python3.9/site.py", line 169, in addpackage
      exec(line)
    File "<string>", line 1, in <module>
  ModuleNotFoundError: No module named '_distutils_hack'

Running pip install -U pip setuptools seems to solve the issue. Can this be solved that this is no longer needed?

Hi,

How do you install pymlst? Conda? Manual?
It seems you miss a package (setuptools)

Benoit

I think the reason could be actually in this line in the setup configuration: 'setuptools~=44.0.0'. I'm in a conda environment with python 3.9 and setuptools was already installed but downgraded when installing pymlst with pip. To resolve the error I had to upgrade the setuptools package as shown above.
To reproduce:

conda create env -n pymlst python=3.9 #More recent will not work because for some dependencies, python <3.10 is required if I'm not mistaking.
conda activate pymlst
pip install pymlst
pyMLST 

Installing from conda doesn't seem to work. I think it's because in the recipe no python version was specified and it's using my installed python version which is >3.10.

OK, thx, I wil check this latter.
I'm currently on 3.9.2 python version and i don't see this problem.

Benoit

Python 3.18 is not out yet. We are currently at 3.11.2. Are you working in a conda environment? Could you share your environment?
conda env export -n nameofcondaenv > env.yml. Can't get it to work, would like to see the version of packages you're using.

Yes, I make a mistake.

I work with python 3.9.2 on debian stable

name: pymlst
channels:
  - defaults
  - bioconda
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=conda_forge
  - _openmp_mutex=4.5=2_gnu
  - alembic=1.8.1=py39h06a4308_0
  - attrs=22.1.0=py39h06a4308_0
  - beautifulsoup4=4.11.1=py39h06a4308_0
  - biopython=1.78=py39h7f8727e_0
  - blas=1.0=mkl
  - bottleneck=1.3.5=py39h7deecbd_0
  - brotlipy=0.7.0=py39h27cfd23_1003
  - ca-certificates=2023.01.10=h06a4308_0
  - certifi=2022.12.7=py39h06a4308_0
  - cffi=1.15.1=py39h5eee18b_3
  - charset-normalizer=2.0.4=pyhd3eb1b0_0
  - click=8.0.4=py39h06a4308_0
  - cryptography=39.0.1=py39h9ce1e76_0
  - decorator=5.1.1=pyhd3eb1b0_0
  - greenlet=2.0.1=py39h6a678d5_0
  - idna=3.4=py39h06a4308_0
  - iniconfig=1.1.1=pyhd3eb1b0_0
  - intel-openmp=2021.4.0=h06a4308_3561
  - kma=1.4.9=h7132678_0
  - ld_impl_linux-64=2.38=h1181459_1
  - libffi=3.4.2=h6a678d5_6
  - libgcc-ng=12.2.0=h65d4601_19
  - libgomp=12.2.0=h65d4601_19
  - libpng=1.6.37=hbc83047_0
  - libstdcxx-ng=11.2.0=h1234567_1
  - libuuid=2.32.1=h7f98852_1000
  - libzlib=1.2.13=h166bdaf_4
  - mafft=7.515=hec16e2b_0
  - mako=1.2.3=py39h06a4308_0
  - markupsafe=2.1.1=py39h7f8727e_0
  - mkl=2021.4.0=h06a4308_640
  - mkl-service=2.4.0=py39h7f8727e_0
  - mkl_fft=1.3.1=py39hd3c417c_0
  - mkl_random=1.2.2=py39h51133e4_0
  - mysql-connector-c=6.1.11=h24aacaa_2
  - ncurses=6.4=h6a678d5_0
  - networkx=2.8.4=py39h06a4308_0
  - numexpr=2.8.4=py39he184ba9_0
  - numpy=1.23.5=py39h14f4228_0
  - numpy-base=1.23.5=py39h31eccc5_0
  - openssl=1.1.1t=h7f8727e_0
  - packaging=22.0=py39h06a4308_0
  - pandas=1.5.2=py39h417a72b_0
  - pip=22.3.1=py39h06a4308_0
  - pluggy=1.0.0=py39h06a4308_1
  - prompt-toolkit=3.0.36=py39h06a4308_0
  - prompt_toolkit=3.0.36=hd3eb1b0_0
  - py=1.11.0=pyhd3eb1b0_0
  - pycparser=2.21=pyhd3eb1b0_0
  - pymlst=2.1.3=pyh5e36f6f_0
  - pyopenssl=23.0.0=py39h06a4308_0
  - pysocks=1.7.1=py39h06a4308_0
  - pytest=7.1.2=py39h06a4308_0
  - python=3.9.16=h7a1cb2a_0
  - python-dateutil=2.8.2=pyhd3eb1b0_0
  - pytz=2022.7=py39h06a4308_0
  - questionary=1.10.0=pyhd8ed1ab_1
  - readline=8.2=h5eee18b_0
  - requests=2.28.1=py39h06a4308_0
  - setuptools=65.6.3=py39h06a4308_0
  - six=1.16.0=pyhd3eb1b0_1
  - soupsieve=2.3.2.post1=py39h06a4308_0
  - sqlalchemy=1.4.39=py39h5eee18b_0
  - sqlite=3.40.1=h5082296_0
  - tk=8.6.12=h1ccaba5_0
  - tomli=2.0.1=py39h06a4308_0
  - tzdata=2022g=h04d1e81_0
  - ucsc-blat=377=ha8a8165_4
  - urllib3=1.26.14=py39h06a4308_0
  - wcwidth=0.2.5=pyhd3eb1b0_0
  - wheel=0.38.4=py39h06a4308_0
  - xz=5.2.10=h5eee18b_1
  - zlib=1.2.13=h166bdaf_4

The problems with new version of python is the SQLAlchemy version (>2.0) that is currently oncompatible with panda
https://stackoverflow.com/questions/75315117/attributeerror-connection-object-has-no-attribute-connect-when-use-df-to-sq

I'm going to specifiy SQLAlchemy version on conda recipices.

Can you confirm?

I upgrade requirement and setup.py for newer version of package with the exception of >2.0 version of SQLAlchemy.

I currently try to update conda recipices

I make conda update to 2.1.3-1.
Normally, it works now with python 3.10 and 3.11

I will test it hopefully next week and report back. Thanks for the updates!

good