Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issues installing on Windows 11 #125

Open
wichne opened this issue Jun 6, 2024 · 7 comments
Open

Issues installing on Windows 11 #125

wichne opened this issue Jun 6, 2024 · 7 comments

Comments

@wichne
Copy link
Collaborator

wichne commented Jun 6, 2024

I got miniforge installed with minor difficulty (I had previously installed a more recent version of Python and so had to change my PYTHONHOME environment variable to point to the minoforge python.exe to get Miniforge Prompt to work correctly.)

Running the environment_Windows.yml set up, though I got the following error. Any ideas?

(base) C:\Users\wichn>mamba env create -f environment_Windows.yml
Channels:
 - anaconda
 - bioconda
 - numba
 - conda-forge
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done


==> WARNING: A newer version of conda exists. <==
    current version: 24.3.0
    latest version: 24.5.0

Please update conda by running

    $ conda update -n base -c conda-forge conda



Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: \

    Windows 64-bit packages of scikit-learn can be accelerated using scikit-learn-intelex.
    More details are available here: https://intel.github.io/scikit-learn-intelex

    For example:

        $ conda install scikit-learn-intelex
        $ python -m sklearnex my_application.py


done
Installing pip dependencies: | Ran pip subprocess with arguments:
['C:\\Users\\wichn\\miniforge3\\envs\\snekmer\\python.exe', '-m', 'pip', 'install', '-U', '-r', 'C:\\Users\\wichn\\cond]
Pip subprocess output:
Obtaining snekmer from git+https://github.com/PNNL-CompBio/Snekmer#egg=snekmer (from -r C:\Users\wichn\condaenv.ibn2zmd)
  Cloning https://github.com/PNNL-CompBio/Snekmer to c:\users\wichn\src\snekmer

Pip subprocess error:
  ERROR: Error [WinError 2] The system cannot find the file specified while executing command git version
ERROR: Cannot find command 'git' - do you have 'git' installed and in your PATH?

failed

CondaEnvException: Pip failed
@wichne
Copy link
Collaborator Author

wichne commented Jun 6, 2024

Activating the snekmer environment and installing git and then re-running the pip install solved the problem.
So maybe you just need to add git to the dependencies in environment_Windows.yml.

(base) C:\Users\wichn>mamba activate snekmer
(snekmer) C:\Users\wichn>mamba install git

Looking for: ['git']

warning  libmamba Could not parse mod/etag header
warning  libmamba Could not parse mod/etag header
conda-forge/noarch                                  14.9MB @   7.5MB/s Downloaded  2.0s
conda-forge/win-64                                  22.5MB @   8.3MB/s  2.7s

Pinned packages:
  - python 3.10.*


Transaction

  Prefix: C:\Users\wichn\miniforge3\envs\snekmer

  Updating specs:

   - git
   - ca-certificates
   - certifi
   - openssl


  Package               Version  Build            Channel           Size
--------------------------------------------------------------------------
  Install:
--------------------------------------------------------------------------

  + git                  2.45.1  h57928b3_0       conda-forge      121MB

  Upgrade:
--------------------------------------------------------------------------

  - ca-certificates  2023.08.22  haa95532_0       anaconda        Cached
  + ca-certificates    2024.6.2  h56e8100_0       conda-forge      157kB
  - openssl              3.0.12  h2bbff1b_0       anaconda        Cached
  + openssl               3.3.1  h2466b09_0       conda-forge        8MB
  - certifi          2023.11.17  py310haa95532_0  anaconda        Cached
  + certifi            2024.2.2  pyhd8ed1ab_0     conda-forge     Cached

  Summary:

  Install: 1 packages
  Upgrade: 3 packages

  Total download: 130MB

--------------------------------------------------------------------------


Confirm changes: [Y/n]
ca-certificates                                    156.5kB @ 645.5kB/s  0.2s
openssl                                              8.4MB @   5.3MB/s  1.6s
git                                                121.5MB @  26.0MB/s  4.7s

Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(snekmer) C:\Users\wichn>pip install git+https://github.com/PNNL-CompBio/Snekmer#egg=snekmer
Collecting snekmer
  Cloning https://github.com/PNNL-CompBio/Snekmer to c:\users\wichn\appdata\local\temp\pip-install-9kzb0dyq\snekmer_93a5408ed6c44ecc940ae5435f72304f
  Running command git clone --filter=blob:none --quiet https://github.com/PNNL-CompBio/Snekmer 'C:\Users\wichn\AppData\Local\Temp\pip-install-9kzb0dyq\snekmer_93a5408ed6c44ecc940ae5435f72304f'
  Resolved https://github.com/PNNL-CompBio/Snekmer to commit c3b8d91364dea42c543b895fa7f5209efafd8eb6
  Preparing metadata (setup.py) ... done
Building wheels for collected packages: snekmer
  Building wheel for snekmer (setup.py) ... done
  Created wheel for snekmer: filename=snekmer-1.3.0-py3-none-any.whl size=81851 sha256=a29ce0fd8d8b9f177c711b9a55c8c70edf7ee3e659212fd0f5171d111380d93d
  Stored in directory: C:\Users\wichn\AppData\Local\Temp\pip-ephem-wheel-cache-2zy6q4om\wheels\74\33\fb\95175be0d4ead73e7fbcaa2dc1c10eba3f77b1aec5b338d7cd
Successfully built snekmer
Installing collected packages: snekmer
Successfully installed snekmer-1.3.0

(snekmer) C:\Users\wichn>

@wichne
Copy link
Collaborator Author

wichne commented Jun 6, 2024

I put two protein family files in an 'input' directory, and a background protein set in 'input/background'.
I pulled the basic config file and altered it to k=6, alphabet=0 and ran snekmer model and got the following:

(snekmer) C:\Users\wichn\PhageProtein>snekmer model --dry-run
Building DAG of jobs...
MissingInputException in line 128 of C:\Users\wichn\miniforge3\envs\snekmer\lib\site-packages\snekmer\rules\model.smk:
Missing input files for rule score:
uniprot_phageprot_230_270

@wichne
Copy link
Collaborator Author

wichne commented Jun 8, 2024

I downgraded to numpy 1.22.3, but that broke pandas (v2.1.1).

      ImportError: this version of pandas is incompatible with numpy < 1.22.4
      your numpy version is 1.22.3.
      Please upgrade numpy to >= 1.22.4 to use this pandas version

@wichne
Copy link
Collaborator Author

wichne commented Jun 8, 2024

So I tried creating an environment just with python==3.9 and then did a 'pip install snekmer', which did successfully install:
MarkupSafe-2.1.5
appdirs-1.4.4
attrs-23.2.0
biopython-1.83
certifi-2024.6.2
charset-normalizer-3.3.2
colorama-0.4.6
configargparse-1.7
connection_pool-0.0.3
contourpy-1.2.1
cycler-0.12.1
cython-0.29.37
datrie-0.8.2
docutils-0.21.2
dpath-2.1.6
fastjsonschema-2.19.1
filelock-3.14.0
fonttools-4.53.0
gitdb-4.0.11
gitpython-3.1.43
hdbscan-0.8.36
idna-3.7
importlib-resources-6.4.0
jinja2-3.1.4
joblib-1.4.2
jsonschema-4.22.0
jsonschema-specifications-2023.12.1
jupyter-core-5.7.2
kiwisolver-1.4.5
llvmlite-0.42.0
matplotlib-3.8.4
nbformat-5.10.4
numba-0.59.1
numpy-1.22.3
packaging-24.0
pandas-1.4.2
pillow-10.3.0
plac-1.4.3
platformdirs-4.2.2
psutil-5.9.8
pulp-2.8.0
pyarrow-16.1.0
pynndescent-0.5.12
pyparsing-3.1.2
python-dateutil-2.9.0.post0
pytz-2024.1
pywin32-306
pyyaml-6.0.1
ratelimiter-1.2.0.post0
referencing-0.35.1
requests-2.32.3
rpds-py-0.18.1
scikit-learn-1.5.0
scipy-1.11.4
seaborn-0.13.2
six-1.16.0
smart_open-7.0.4 smmap-5.0.1
snakemake-7.0.0
snekmer-1.2.0
stopit-1.1.2
tabulate-0.8.10
threadpoolctl-3.5.0
toposort-1.10
tqdm-4.66.4
traitlets-5.14.3
umap-learn-0.5.6
urllib3-2.2.1
wrapt-1.16.0
yte-1.5.4
zipp-3.19.2

But still no joy running snekmer:

(snekmer) C:\Users\wichn\PhageProtein>snekmer model
Building DAG of jobs...
MissingInputException in line 128 of C:\Users\wichn\miniforge3\envs\snekmer\lib\site-packages\snekmer\rules\model.smk:
Missing input files for rule score:
uniprot_phageprot_230_270

@wichne
Copy link
Collaborator Author

wichne commented Jun 18, 2024

Update:
This error only occurs if there is a file in the background folder, and occurs even if the file is not recognizable as input (ie, is lacking a recognized extension (eg .faa, .fa, .fasta)).

@wichne
Copy link
Collaborator Author

wichne commented Jun 18, 2024

If I comment out line 133 of model.smk
bg=BGS
the error goes away.

A question: does it matter if I comment out this line? 'bg' doesn't appear anywhere else in the .smk file.

@wichne
Copy link
Collaborator Author

wichne commented Jun 18, 2024

Okay, I think I understand what the problem is.

In 'model.smk', on lines 78-83, the variable BGS is set to the basename of whatever file(s?) is in the background directory. [Note here: there is never a check to see if the file in the background subdir has a valid extension.] So the value in BGS does not have a file extension, nor a path to where the file resides.

Down at line 133, in rule score:input:, bg is set to BGS. If the program is looking for the values in BGS to be valid filepaths, they aren't. They're just the file base name. So the question is what is that value supposed to be? The path to the npz like for the NON_BGS in the line above? I'm going to try that and see if it works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant