Sage-Bionetworks / synapser

An R package providing programmatic access to Synapse
Apache License 2.0
32 stars 21 forks source link

when installing urllib3 not imported #252

Closed xtYao closed 5 years ago

xtYao commented 5 years ago

Operating system

CentOS 7

Description of the problem

python urllib3 module not found during synapser installation even though the package is already there.

Expected behavior

Python should be able to find urllib3 as I saw from running this line in a python console:

bash:mskilab01:~/software 1002 $ python
Python 3.5.2 (default, Oct 27 2016, 10:30:44)
[GCC 4.9.2 20150212 (Red Hat 4.9.2-6)] on linux
Type "help", "copyright", "credits" or "license" for more information.

import urllib3

Actual behavior

install.packages("synapser", repos = c("http://ran.synapse.org", "http://cran.fhcrc.org"))

File Edit Options Buffers Tools iESS Complete In/Out Signals Help
Using /gpfs/commons/home/xyao/.local/lib/python3.5/site-packages

Searching for urllib3==1.23

Best match: urllib3 1.23

Adding urllib3 1.23 to easy-install.pth file

Using /gpfs/commons/home/xyao/.local/lib/python3.5/site-packages

Searching for idna==2.7

Best match: idna 2.7

Adding idna 2.7 to easy-install.pth file

Using /gpfs/commons/home/xyao/.local/lib/python3.5/site-packages

Searching for chardet==3.0.4

Best match: chardet 3.0.4

Adding chardet 3.0.4 to easy-install.pth file

Installing chardetect script to /tmp/RtmpeV96TB/R.INSTALLc00a729021d7/synapser/inst/bin

Using /gpfs/commons/home/xyao/.local/lib/python3.5/site-packages

Finished processing dependencies for synapseclient==1.9.2

Traceback (most recent call last):

File "", line 1, in

File "/tmp/RtmpeV96TB/R.INSTALLc00a729021d7/synapser/inst/python/installPythonClient.py", line 82, in main

import synapseclient
File "/tmp/RtmpeV96TB/R.INSTALLc00a729021d7/synapser/inst/lib/python3.5/site-packages/synapseclient-1.9.2-py3.5.egg/s\ ynapseclient/init.py", line 274, in

from .client import Synapse, login
File "/tmp/RtmpeV96TB/R.INSTALLc00a729021d7/synapser/inst/lib/python3.5/site-packages/synapseclient-1.9.2-py3.5.egg/s\ ynapseclient/client.py", line 78, in

from . import cache
File "/tmp/RtmpeV96TB/R.INSTALLc00a729021d7/synapser/inst/lib/python3.5/site-packages/synapseclient-1.9.2-py3.5.egg/s\ ynapseclient/cache.py", line 26, in

from synapseclient.lock import Lock
File "/tmp/RtmpeV96TB/R.INSTALLc00a729021d7/synapser/inst/lib/python3.5/site-packages/synapseclient-1.9.2-py3.5.egg/s\ ynapseclient/lock.py", line 12, in

from synapseclient.exceptions import *
File "/tmp/RtmpeV96TB/R.INSTALLc00a729021d7/synapser/inst/lib/python3.5/site-packages/synapseclient-1.9.2-py3.5.egg/s\ ynapseclient/exceptions.py", line 20, in

import requests
File "/tmp/RtmpeV96TB/R.INSTALLc00a729021d7/synapser/inst/lib/python3.5/site-packages/requests-2.22.0-py3.5.egg/reque\ sts/init.py", line 43, in

import urllib3
ImportError
:
No module named 'urllib3'
Error in PythonEmbedInR::pyExec(command) :
An error has occurred while executing Python code. See traceback above.
Execution halted
ERROR: configuration failed for package ‘synapser’

Output of sessionInfo()

sessionInfo()
R version 3.5.1 (2018-07-02)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: CentOS Linux 7 (Core)

Matrix products: default
BLAS: /nfs/sw/R/R-3.5.1/lib64/R/lib/libRblas.so
LAPACK: /nfs/sw/R/R-3.5.1/lib64/R/lib/libRlapack.so

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C
[3] LC_TIME=en_US.UTF-8 LC_COLLATE=en_US.UTF-8
[5] LC_MONETARY=en_US.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=en_US.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel stats4 stats graphics grDevices utils datasets
[8] methods base

other attached packages:
[1] Flow_0.0.0.9000 gGnome_0.1
[3] gTrack_0.1.0 Matrix_1.2-17
[5] skitools_0.0.0.9000 igraph_1.2.4
[7] reshape2_1.4.3 plotly_4.8.0
[9] ggplot2_3.1.1 stringr_1.4.0
[11] gUtils_0.2.0 data.table_1.12.2
[13] usethis_1.5.0 devtools_2.0.1
[15] htmlwidgets_1.3 VariantAnnotation_1.28.13
[17] Rsamtools_1.34.1 Biostrings_2.50.2
[19] XVector_0.22.0 SummarizedExperiment_1.12.0
[21] DelayedArray_0.8.0 BiocParallel_1.16.6
[23] matrixStats_0.54.0 Biobase_2.42.0
[25] GenomicRanges_1.34.0 GenomeInfoDb_1.18.2
[27] IRanges_2.16.0 S4Vectors_0.20.1
[29] BiocGenerics_0.28.0

loaded via a namespace (and not attached):
[1] bitops_1.0-6 fs_1.2.7 bit64_0.9-7
[4] progress_1.2.0 httr_1.4.0 rprojroot_1.3-2
[7] tools_3.5.1 backports_1.1.3 R6_2.4.0
[10] DBI_1.0.0 lazyeval_0.2.2 colorspace_1.4-1
[13] withr_2.1.2 tidyselect_0.2.5 prettyunits_1.0.2
[16] processx_3.3.0 bit_1.1-14 compiler_3.5.1
[19] cli_1.1.0 desc_1.2.0 rtracklayer_1.42.2
[22] scales_1.0.0 callr_3.2.0 digest_0.6.18
[25] pkgconfig_2.0.2 htmltools_0.3.6 sessioninfo_1.1.1
[28] BSgenome_1.50.0 rlang_0.3.4 RSQLite_2.1.1
[31] jsonlite_1.6 dplyr_0.8.0.1 RCurl_1.95-4.12
[34] magrittr_1.5 GenomeInfoDbData_1.2.0 Rcpp_1.0.1
[37] munsell_0.5.0 stringi_1.4.3 zlibbioc_1.28.0
[40] pkgbuild_1.0.3 plyr_1.8.4 grid_3.5.1
[43] blob_1.1.1 crayon_1.3.4 lattice_0.20-35
[46] GenomicFeatures_1.34.7 hms_0.4.2 ps_1.3.0
[49] pillar_1.3.1 biomaRt_2.38.0 pkgload_1.0.2
[52] XML_3.98-1.19 glue_1.3.1 remotes_2.0.2
[55] testthat_2.0.1 gtable_0.3.0 purrr_0.3.2
[58] tidyr_0.8.3 assertthat_0.2.1 viridisLite_0.3.0
[61] tibble_2.1.1 GenomicAlignments_1.18.1 AnnotationDbi_1.44.0
[64] memoise_1.1.0

kimyen commented 5 years ago

Hello @xtYao , thank you for reporting the issue. synapser package uses a separate Python environment. This environment is separated from the user's Python environment. We designed the package this way, so that installation of synapser won't affect the user's Python environment and when user changes their Python environment, it won't affect the package.

For synapser to successfully install it dependencies including Python, please verify that your machine has all the required dependencies. Please see this articles for the required dependencies: https://r-docs.synapse.org/articles/systemDependencies.html. Your output seems like you should have the required dependencies to get this far. However, I would like to double check this case, making sure we do not miss a step here. Please let me know if you had the required dependencies, and the problem persist. Thank you.