Fxe / cobrakbase

KBase Interface for COBRApy
MIT License
2 stars 4 forks source link

import error #14

Open xinlia opened 1 year ago

xinlia commented 1 year ago

I install this package on python 3.7.0 with pip install cobrakbase. But when I import it import cobrakbase, an error happend.

c:\Users\vickenlee\AppData\Local\Programs\Python\Python37\lib\site-packages\cobrakbase\Workspace\WorkspaceClient.py in 10 # the following is a hack to get the baseclient to import whether we're in a 11 # package or not. This makes pep8 unhappy hence the annotations. ---> 12 from cobrakbase.Workspace.baseclient import BaseClient as _BaseClient 13 #try: 14 # # baseclient and this client are in a package ... --> 678 raise KeyError(key) from None 679 return self.decodevalue(value) 680

KeyError: 'HOME'

Fxe commented 1 year ago

You need to setup a HOME environmental variable for bash: export HOME=<your home folder> or use python import os to setup HOME variable https://stackoverflow.com/questions/5971312/how-to-set-environment-variables-in-python If you use python this has to be done before import cobrakbase