vibtcr icon indicating copy to clipboard operation
vibtcr copied to clipboard

Error in vibtcr setup command

Open tcrpep opened this issue 1 year ago • 1 comments

I am new to python and I am trying to install vibtcr; but I keep having this error:

error in vibtcr setup command: 'install_requires' must be a string or list of strings containing valid project/version requirement specifiers; Parse error at "'ÿþc\x00e\x00r\x00'": Expected W:(0-9A-Za-z)

tcrpep avatar Apr 07 '23 10:04 tcrpep

I'm trying tcrpep today ... First I created a new environment using conda (well, mamba for speed). With appropriate .condarc (probably need pytorch channel, and "flexible" solve), I changed 2 things in requirements.txt:

  1. scikit_learn --> scikit-learn (wants dash, not underscore)
  2. torch --> pytorch (later I find this is a typo only for the conda/mamba step!)

At this point I could mamba create -n vibtcr --file=requirements.txt (or conda if you are patient).

At this point, conda activate vibtcr && pip install -e . might be appropriate. Alas, "No matching distribution found for pytorch==1.10.0". So cp requirements.txt req.mamba.txt (because that worked for conda/mamba) and then edit requirements.txt REVERTING edit (2.); i.e. change back 'pytorch' to 'torch'.

At this point, conda activate vibtcr && pip install -e . might be appropriate. This time it goes through the setup.py install (finding 15 packages with "Requirement already satisfied"). YAY! --> Running setup.py develop for vibtcr --> Successfully installed vibtcr-0.1.0

I used pip install "-e" because I might want to be able to edit vibtcr files. You might just want to use it as is and elide the "-e".

I didn't try python setup.py ... without conda (probably be a bad idea). Why was my 1st instinct to try the 2-step approach first? Because I like to have as few pip install packages as possible.

At this point (in environment 'vibtcr') I can fire up python and import vibtcr To create an object took a few minutes fiddling on the command line to get the imports not bombing:

# simple test.  Does this run without bombing?
import vibtcr, vibtcr.mvib, vibtcr.base
from vibctr.mvib.mvib import MVIB
foo=MVIB(z_dim=10, device="cpu")

Cheers, Erik.

kruus avatar Sep 29 '23 17:09 kruus