StatCan / aaw

Documentation for the Advanced Analytics Workspace Platform
https://statcan.github.io/aaw/
Other
68 stars 12 forks source link

jfrog/artifactory: downloading/installing package files from the repository is failing #1961

Closed novetim closed 1 month ago

novetim commented 2 months ago

Description

When using an external VM to download numpy - Python package, errors occur. NOTE: This error has happened to more than one user on different VMs.

When downloading from the website, the download doesn't have permission to write. image

When using the a command line option, the install fails. image

Resource source: Following these procedure to install a package: https://statcan.github.io/cae-eac/en/Artifactory/ https://statcan.github.io/cae-eac/en/Artifactory/#command-prompt https://statcan.github.io/cae-eac/en/Artifactory/#python-application

Environment info

CAE Windows Virtual Machine - sto-novetim

Steps to reproduce

Steps to reproduce the behavior:

  1. Start Command Prompt
  2. Follow instructions in the CAE manual.
  3. Command Prompt Run this code to setup pip to download packages from Artifactory repositories by default: pip config --user set global.index-url https://jfrog.aaw.cloud.statcan.ca/artifactory/api/pypi/pypi-remote/simple
  4. Configure VSC You can now use pip3* or pip** command to install packages as following: pip3 install numpy
  5. Package install fails

Expected behaviour

Jfrog should have allowed the package to install and be accessible, and download shouldn't fail.

Screenshots

See above.

Souheil-Yazji commented 2 months ago

@novetim the package is successfully downloaded from Jfrog, see

image

where it has successfully fetched and is now attempting to install, the installation step is where the failure happens.

The error you are seeing is at the OS level, see oserror. It seems to do with your system permissions, see this reference: https://stackoverflow.com/questions/68333213/display-a-warning-when-trying-to-install-python-packages

this would be outside the scope of the AAW team.

Some suggestions: If you’re not already using a virtual environment, consider creating one to avoid these kinds of issues. You can create a virtual environment with the following commands:

python -m venv myenv
myenv\Scripts\activate

Sometimes upgrading pip and setuptools can resolve issues with package installation:

python -m pip install --upgrade pip setuptools