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

Various issues / questions about the installation #5

Closed
florianhartig opened this issue Feb 19, 2020 · 13 comments
Closed

Various issues / questions about the installation #5

florianhartig opened this issue Feb 19, 2020 · 13 comments

Comments

@florianhartig
Copy link
Member

florianhartig commented Feb 19, 2020

For me,

install_sjSDM()
install_sjSDM(method = "auto")

produces error

Error in install_sjSDM() : object 'package' not found

Also, https://github.com/TheoreticalEcology/s-jSDM#install-instructions doesn't seem to be up to date

@MaximilianPi
Copy link
Member

Try again. I think, a trouble shooting guide for the installation would be helpful. I think most people will fail because of the python2/3 mess

@florianhartig
Copy link
Member Author

If I do

install_sjSDM()

I now get

 Error in reticulate::py_install(packages = c(stringr::str_split_fixed(unlist(packages),  : 
  object 'python_version' not found 
3.
conda_install(envname, packages = packages, conda = conda, python_version = python_version, 
    ...) 
2.
reticulate::py_install(packages = c(stringr::str_split_fixed(unlist(packages), 
    " ", n = Inf)[1, ], "sjSDM_py"), envname = envname, method = method, 
    conda = conda, pip = TRUE, python_version = python_version) at install.R#102
1.
install_sjSDM() 

@florianhartig
Copy link
Member Author

Regardless of improving the install functions, I wonder if we should provide manual install instructions in case the automatic install fails? I think it will be very hard to ensure a proper functioning of the install function on all OS / settings.

@MaximilianPi
Copy link
Member

Yes, I will add instructions. PyTorch is more challenging than tensorflow.

Maybe change your python_version to 3.6? Do you have conda installed?

@florianhartig
Copy link
Member Author

I have Python 3.6.8 |Anaconda, Inc.| (default, Dec 29 2018, 19:04:46)
[GCC 4.2.1 Compatible Clang 4.0.1 (tags/RELEASE_401/final)] on darwin

@MaximilianPi
Copy link
Member

Okay, maybe sjSDM::install_sjSDM(python_version=3.6) works. But its a good reminder, we have to change the behaviour so that it only checks the minimal requirement of python >= 3.6.

@florianhartig
Copy link
Member Author

I think the problem in my code is that the code wants python_version, but the function interface has conda_python_version

@florianhartig
Copy link
Member Author

yes, changing this it runs

@florianhartig
Copy link
Member Author

Now I have have this ;)

Collecting package metadata (current_repodata.json): ...working... done
Solving environment: ...working... done

## Package Plan ##

  environment location: /anaconda3/envs/r-sjSDM

  added / updated specs:
    - python=3.6


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    ca-certificates-2020.1.1   |                0         125 KB
    certifi-2019.11.28         |           py36_0         153 KB
    libcxx-4.0.1               |       hcfea43d_1         947 KB
    libcxxabi-4.0.1            |       hcfea43d_1         350 KB
    libedit-3.1.20181209       |       hb402a30_0         136 KB
    ncurses-6.1                |       h0a44026_1         732 KB
    openssl-1.1.1d             |       h1de35cc_4         2.2 MB
    pip-20.0.2                 |           py36_1         1.7 MB
    python-3.6.10              |       h359304d_0        17.1 MB
    readline-7.0               |       h1de35cc_5         316 KB
    setuptools-45.2.0          |           py36_0         511 KB
    sqlite-3.31.1              |       ha441bb4_0         1.2 MB
    tk-8.6.8                   |       ha441bb4_0         2.8 MB
    wheel-0.34.2               |           py36_0          50 KB
    xz-5.2.4                   |       h1de35cc_4         239 KB
    zlib-1.2.11                |       h1de35cc_3          90 KB
    ------------------------------------------------------------
                                           Total:        28.6 MB

The following NEW packages will be INSTALLED:

  ca-certificates    pkgs/main/osx-64::ca-certificates-2020.1.1-0
  certifi            pkgs/main/osx-64::certifi-2019.11.28-py36_0
  libcxx             pkgs/main/osx-64::libcxx-4.0.1-hcfea43d_1
  libcxxabi          pkgs/main/osx-64::libcxxabi-4.0.1-hcfea43d_1
  libedit            pkgs/main/osx-64::libedit-3.1.20181209-hb402a30_0
  libffi             pkgs/main/osx-64::libffi-3.2.1-h475c297_4
  ncurses            pkgs/main/osx-64::ncurses-6.1-h0a44026_1
  openssl            pkgs/main/osx-64::openssl-1.1.1d-h1de35cc_4
  pip                pkgs/main/osx-64::pip-20.0.2-py36_1
  python             pkgs/main/osx-64::python-3.6.10-h359304d_0
  readline           pkgs/main/osx-64::readline-7.0-h1de35cc_5
  setuptools         pkgs/main/osx-64::setuptools-45.2.0-py36_0
  sqlite             pkgs/main/osx-64::sqlite-3.31.1-ha441bb4_0
  tk                 pkgs/main/osx-64::tk-8.6.8-ha441bb4_0
  wheel              pkgs/main/osx-64::wheel-0.34.2-py36_0
  xz                 pkgs/main/osx-64::xz-5.2.4-h1de35cc_4
  zlib               pkgs/main/osx-64::zlib-1.2.11-h1de35cc_3



Downloading and Extracting Packages
sqlite-3.31.1        | 1.2 MB    | ########## | 100% 
zlib-1.2.11          | 90 KB     | ########## | 100% 
ncurses-6.1          | 732 KB    | ########## | 100% 
libedit-3.1.20181209 | 136 KB    | ########## | 100% 
readline-7.0         | 316 KB    | ########## | 100% 
python-3.6.10        | 17.1 MB   | ########## | 100% 
wheel-0.34.2         | 50 KB     | ########## | 100% 
pip-20.0.2           | 1.7 MB    | ########## | 100% 
xz-5.2.4             | 239 KB    | ########## | 100% 
ca-certificates-2020 | 125 KB    | ########## | 100% 
certifi-2019.11.28   | 153 KB    | ########## | 100% 
tk-8.6.8             | 2.8 MB    | ########## | 100% 
libcxx-4.0.1         | 947 KB    | ########## | 100% 
setuptools-45.2.0    | 511 KB    | ########## | 100% 
libcxxabi-4.0.1      | 350 KB    | ########## | 100% 
openssl-1.1.1d       | 2.2 MB    | ########## | 100% 
Preparing transaction: ...working... done
Verifying transaction: ...working... done
Executing transaction: ...working... done
#
# To activate this environment, use
#
#     $ conda activate r-sjSDM
#
# To deactivate an active environment, use
#
#     $ conda deactivate

ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'pytorch'

@florianhartig
Copy link
Member Author

I'm still getting

> install_sjSDM()
Error in strsplit(unlist(package), " ", fixed = TRUE) : 
  non-character argument

MaximilianPi added a commit that referenced this issue Feb 20, 2020
@MaximilianPi
Copy link
Member

We have to see how the installation vignette works for the users. Since most of the errors in this issue are solved and provide no help for the users, I will close this issue.

@MaximilianPi
Copy link
Member

installation via conda is still buggy

@MaximilianPi MaximilianPi reopened this Mar 11, 2020
@florianhartig
Copy link
Member Author

florianhartig commented Mar 11, 2020

It's probably not possible to consider all issues that could occur. What I would do is to make sure that we have an error message that always works and directs to a good help file (I think we have this), and add in the help, maybe even in the error message, that people should create an issue here in case they have a problem. This will reduce frustration, and also, we will get an idea about what the typical problems are.

Maybe you should add the think with deleting the environments though, as this could be a frequent problem.

MaximilianPi added a commit that referenced this issue Mar 15, 2020
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