Minepy install error

(base) C:\Users\tomcp>pip install minepy
WARNING: Ignoring invalid distribution -umpy (c:\programdata\anaconda3\lib\site-packages)
WARNING: Ignoring invalid distribution -umpy (c:\programdata\anaconda3\lib\site-packages)
Collecting minepy
Using cached minepy-1.2.5.tar.gz (495 kB)
ERROR: Command errored out with exit status 1:
command: ‘C:\ProgramData\Anaconda3\python.exe’ -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"‘C:\Users\tomcp\AppData\Local\Temp\pip-install-irgxy0la\minepy_67b423ef3ae144f1b08128d0a1b3e8af\setup.py’"’"’; file=’"’"‘C:\Users\tomcp\AppData\Local\Temp\pip-install-irgxy0la\minepy_67b423ef3ae144f1b08128d0a1b3e8af\setup.py’"’"’;f = getattr(tokenize, ‘"’"‘open’"’"’, open)(file) if os.path.exists(file) else io.StringIO(’"’"‘from setuptools import setup; setup()’"’"’);code = f.read().replace(’"’"’\r\n’"’"’, ‘"’"’\n’"’"’);f.close();exec(compile(code, file, ‘"’"‘exec’"’"’))’ egg_info --egg-base ‘C:\Users\tomcp\AppData\Local\Temp\pip-pip-egg-info-5c167r_m’
cwd: C:\Users\tomcp\AppData\Local\Temp\pip-install-irgxy0la\minepy_67b423ef3ae144f1b08128d0a1b3e8af
Complete output (1 lines):
error in minepy setup command: use_2to3 is invalid.

Hi Tom,

I believe this is an error with a pip or setuptools dependency. I recall seeing this for some internal dependencies recently.

For us, the simple fix was to pin the version of setuptools or simpleeval in environment.yml file:

Either add:

setuptools==52.0.0

or

simpleeval==0.9.11

To your environment.yml file.

I’m not sure if this will resolve your issue, but figured it may be a good place to start.

Hi @Tom_Chen !

Instead of installing this package with pip you might instead try to install it with conda since it’s available on the conda-forge and bioconda channels (https://anaconda.org/search?q=minepy). Good practice is also to create a dedicated environment for your work instead of installing everything in the base environment.

1 Like

Thank you for your advice.

I had tried the methods by using conda, but still failed, and when I used “conda install -c conda-forge/label/cf202003 minepy” command. It had run for more than 36 hours, and made me crazy.

~WRD0000.jpg

Oh 36 hours! :open_mouth: Then really try to create a new environment with the dependencies that you need (with conda create -n nameit -c conda-forge minepy pandas jupyterlab ... and conda activate nameit). Environments are super practical!

1 Like