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

nthreads cannot be larger than environment variable "NUMEXPR_MAX_THREADS" #98

Closed
XscapeCn opened this issue Jan 11, 2021 · 7 comments
Closed

Comments

@XscapeCn
Copy link

Hello, after I install Camoco, I run $camocoand I get such a error:

Error.  nthreads cannot be larger than environment variable "NUMEXPR_MAX_THREADS" (64)Traceback (most recent call last):
  File "/data1/home/songxu/software/anaconda3/envs/work/bin/camoco", line 4, in <module>
    __import__('pkg_resources').run_script('camoco==0.6.4', 'camoco')
  File "/data1/home/songxu/software/anaconda3/envs/work/lib/python3.8/site-packages/pkg_resources/__init__.py", line 665, in run_script
    self.require(requires)[0].run_script(script_name, ns)
  File "/data1/home/songxu/software/anaconda3/envs/work/lib/python3.8/site-packages/pkg_resources/__init__.py", line 1463, in run_script
    exec(code, namespace, namespace)
  File "/data1/home/songxu/software/anaconda3/envs/work/lib/python3.8/site-packages/camoco-0.6.4-py3.8-linux-x86_64.egg/EGG-INFO/scripts/camoco", line 17, in <module>
    import camoco as co
  File "/data1/home/songxu/software/anaconda3/envs/work/lib/python3.8/site-packages/camoco-0.6.4-py3.8-linux-x86_64.egg/camoco/__init__.py", line 73, in <module>
    from .COB import COB
  File "/data1/home/songxu/software/anaconda3/envs/work/lib/python3.8/site-packages/camoco-0.6.4-py3.8-linux-x86_64.egg/camoco/COB.py", line 41, in <module>
    from odo import odo
  File "/data1/home/songxu/software/anaconda3/envs/work/lib/python3.8/site-packages/odo-0.5.0-py3.8.egg/odo/__init__.py", line 39, in <module>
    from .backends import sql
  File "/data1/home/songxu/software/anaconda3/envs/work/lib/python3.8/site-packages/odo-0.5.0-py3.8.egg/odo/backends/sql.py", line 304, in <module>
    @discover.register(sa.engine.RowProxy)
AttributeError: module 'sqlalchemy.engine' has no attribute 'RowProxy'

Could you give me some advice?
Thank you!

@schae234
Copy link
Member

Hi @XscapeCn thanks for filing an issue, sorry for the problems. Can you post the output from pip freeze? Camoco is at a weird stage right now, several of the core packages we initially used for analysis are totally abandoned. I'm in the process of a total re-write but I am not able to dedicate as much time to Camoco development as I used to. However, I'd like to help you if I am able.

The package giving you problems here is odo which hasn't been updated for years. In terms of your specific error, my guess is that odo needs an older version of sqlalchemy to work properly. If you provide the package versions from pip freeze we may be able to figure out of an older library would work. Another option is to look at older sqlalchemy releases by date and try to target a release from ~2017.

@XscapeCn
Copy link
Author

Thank you for your reply! The result of $pip freeze is below.

absl-py==0.9.0
apsw==3.27.2.post1
astunparse==1.6.3
asyncssh==2.5.0
attrs==19.3.0
backcall==0.2.0
backoff==1.10.0
bcolz==1.2.1
blaze==0.10.1
bleach==3.1.5
blinker==1.4
boto3==1.16.51
botocore==1.19.51
brotlipy==0.7.0
cachetools==4.1.0
camoco==0.6.4
certifi==2020.6.20
cffi==1.14.4
chardet==3.0.4
click==7.1.2
cryptography==2.9.2
cycler==0.10.0
Cython==0.29.21
dask==2.30.0
dataclasses==0.6
datashape==0.5.2
decorator==4.4.2
defusedxml==0.6.0
Deprecated==1.2.10
entrypoints==0.3
fa2==0.3.5
fastcluster==1.1.26
Flask==1.0.3
Flask-Cors==3.0.10
fsspec==0.8.4
future==0.18.2
fuzzywuzzy==0.18.0
gast==0.3.3
gcloud==0.18.3
google-api-core==1.24.1
google-auth==1.21.1
google-auth-oauthlib==0.4.1
google-cloud==0.34.0
google-cloud-core==1.5.0
google-cloud-storage==1.35.0
google-crc32c==1.1.0
google-pasta==0.2.0
google-resumable-media==1.2.0
googleapis-common-protos==1.52.0
greenlet==1.0a1
grpcio==1.27.2
h5py @ file:///tmp/build/80754af9/h5py_1593454122442/work
httplib2==0.18.1
idna @ file:///tmp/build/80754af9/idna_1593446292537/work
igraph==0.1.11
importlib-metadata @ file:///tmp/build/80754af9/importlib-metadata_1593446406207/work
iniconfig==1.1.1
ipykernel @ file:///tmp/build/80754af9/ipykernel_1594753368510/work/dist/ipykernel-5.3.2-py3-none-any.whl
ipython @ file:///tmp/build/80754af9/ipython_1593447377063/work
ipython-genutils==0.2.0
ipywidgets==7.5.1
itsdangerous==2.0.0a1
jedi @ file:///tmp/build/80754af9/jedi_1592841866100/work
Jinja2==2.11.2
jmespath==0.10.0
joblib==1.0.0
jsonschema==3.2.0
jupyter==1.0.0
jupyter-client @ file:///tmp/build/80754af9/jupyter_client_1594826976318/work
jupyter-console==6.2.0
jupyter-core==4.6.3
jwcrypto==0.8
Keras @ file:///tmp/build/80754af9/keras_split_1593112142734/work
Keras-Preprocessing==1.1.0
kiwisolver==1.3.1
locket==0.2.0
Markdown==3.1.1
markov-clustering==0.0.6.dev0
MarkupSafe==1.1.1
matplotlib==3.3.3
minus80==1.0.0
mistune==0.8.4
mkl-fft==1.1.0
mkl-random==1.1.1
mkl-service==2.3.0
mpmath==1.1.0
multipledispatch==0.6.0
nbconvert==5.6.1
nbformat==5.0.7
networkx==1.11
notebook==6.0.3
numexpr==2.7.2
numpy==1.18.5
oauth2client==4.1.3
oauthlib==3.1.0
odo==0.5.0
opt-einsum==3.1.0
packaging==20.4
pandas==0.23.4
pandas-plink==2.2.4
pandocfilters==1.4.2
parso==0.7.0
partd==1.1.0
patsy==0.5.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==8.0.1
pluggy==0.13.1
powerlaw==1.4.6
prometheus-client==0.8.0
prompt-toolkit==3.0.5
protobuf==3.12.3
psutil==5.8.0
ptyprocess==0.6.0
py==1.9.0
pyarrow==2.0.0
pyasn1==0.4.8
pyasn1-modules==0.2.7
pycparser @ file:///tmp/build/80754af9/pycparser_1594388511720/work
pycryptodome==3.9.9
Pygments==2.6.1
PyJWT==1.7.1
pyOpenSSL @ file:///tmp/build/80754af9/pyopenssl_1594392929924/work
pyparsing==2.4.7
Pyrebase4==4.4.3
pyrsistent==0.16.0
PySocks==1.7.1
pytest==6.1.2
python-dateutil==2.8.1
python-jwt==3.3.0
python-Levenshtein==0.12.0
pytz==2020.4
PyYAML==5.3.1
pyzmq==19.0.1
qtconsole==5.0.1
QtPy==1.9.0
requests @ file:///tmp/build/80754af9/requests_1592841827918/work
requests-oauthlib==1.3.0
requests-toolbelt==0.9.1
rpy2==3.3.6
rsa==4.0
s3transfer==0.3.3
scikit-learn==0.24.0
scipy==1.6.0
Send2Trash==1.5.0
six==1.15.0
SQLAlchemy==1.4.0b1
statsmodels==0.12.1
tables==3.6.1
tensorboard==2.2.1
tensorboard-plugin-wit==1.6.0
tensorflow==2.2.0
tensorflow-estimator==2.2.0
tensorqtl @ file:///data1/home/songxu/software/tensorqtl
termcolor==1.1.0
terminado==0.8.3
testpath==0.4.4
threadpoolctl==2.1.0
tinydb==4.3.0
toml==0.10.2
toolz==0.11.1
torch==1.7.0
tornado==6.0.4
tqdm==4.54.0
traitlets==4.3.3
typing-extensions==3.7.4.3
tzlocal==2.1
urllib3==1.25.9
wcwidth @ file:///tmp/build/80754af9/wcwidth_1593447189090/work
webencodings==0.5.1
Werkzeug==1.0.1
widgetsnbextension==3.5.1
wrapt==1.12.1
xarray==0.16.1
zipp==3.1.0
zstandard==0.14.0

It's really long, thank you for checking.

@schae234
Copy link
Member

Thanks, nothing too crazy looking in here. However, looks like there have been a lot of updates to sqlalchemy recently it could be worth trying an older version to see if its compatible with odo.

@XscapeCn
Copy link
Author

OK, I will try it and report the result here later. Thank you.

@XscapeCn
Copy link
Author

I have installed SQLAlchemy version==1.3.11and it can show the logo of Camoco. But it still have a error.

Error.  nthreads cannot be larger than environment variable "NUMEXPR_MAX_THREADS" (64)usage: camoco [-h] [--version] [--debug] [--interactive] [--force] Available Commands ...

      ___           ___           ___           ___           ___           ___
     /  /\         /  /\         /__/\         /  /\         /  /\         /  /\
    /  /:/        /  /::\       |  |::\       /  /::\       /  /:/        /  /::\
   /  /:/        /  /:/\:\      |  |:|:\     /  /:/\:\     /  /:/        /  /:/\:\
  /  /:/  ___   /  /:/~/::\   __|__|:|\:\   /  /:/  \:\   /  /:/  ___   /  /:/  \:\
 /__/:/  /  /\ /__/:/ /:/\:\ /__/::::| \:\ /__/:/ \__\:\ /__/:/  /  /\ /__/:/ \__\:\
 \  \:\ /  /:/ \  \:\/:/__\/ \  \:\~~\__\/ \  \:\ /  /:/ \  \:\ /  /:/ \  \:\ /  /:/
  \  \:\  /:/   \  \::/       \  \:\        \  \:\  /:/   \  \:\  /:/   \  \:\  /:/
   \  \:\/:/     \  \:\        \  \:\        \  \:\/:/     \  \:\/:/     \  \:\/:/
    \  \::/       \  \:\        \  \:\        \  \::/       \  \::/       \  \::/
     \__\/         \__\/         \__\/         \__\/         \__\/         \__\/

Thank you for your help.

@schae234
Copy link
Member

Hi @XscapeCn, can you see if setting your NUMEXPR_MAX_THREADS environmental variable to something higher? Before you run the camoco command try this command: export NUMEXPR_MAX_THREADS=64.

@XscapeCn
Copy link
Author

Hi, this will still cause that error.But it doesn't matter, camoco run well. I'll look for other solutions. Thank you!

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

2 participants