IBM / ibm-cos-sdk-python

ibm-cos-sdk-python
Apache License 2.0
46 stars 26 forks source link

Unable to Install ibm_boto3 package #50

Closed kevmb99 closed 1 year ago

kevmb99 commented 2 years ago

Using pip install ibm-cos-sdk, I am able to install all necessary packages except ibm_boto3. The original boto3 package is installed, but I've tried cloning the github and running setup.py as well, and unfortunately nothing is working to install it. Any help would be appreciated, thanks!

kevmb99 commented 2 years ago

Update: Since the file was installed on my computer, but not accessible through an import statement, I was able to work around the issue by using sys.path with the file location:

import sys path = '/Users/*****/opt/anaconda3/lib/python3.9/site-packages/ibm_cos_sdk-2.12.0-py3.9.egg' sys.path.insert(0, path)

Then I could import ibm_boto3 without issue, I'd love to solve this problem without having to directly link the folder it is in though

arnabm28 commented 2 years ago

@kevmb99

As part of the pip install of Ibm-cos-sdk pip install ibm-cos-sdk boto core packages should be installed automatically.

drwxr-xr-x  43 arnabmukherjee  staff  1376 Sep 26 15:27 ibm_botocore
drwxr-xr-x   8 arnabmukherjee  staff   256 Sep 26 15:27 ibm_cos_sdk_core-2.12.0.dist-info
drwxr-xr-x  18 arnabmukherjee  staff   576 Sep 26 15:27 ibm_s3transfer
drwxr-xr-x   8 arnabmukherjee  staff   256 Sep 26 15:27 ibm_cos_sdk_s3transfer-2.12.0.dist-info
drwxr-xr-x  11 arnabmukherjee  staff   352 Sep 26 15:27 ibm_boto3
drwxr-xr-x   9 arnabmukherjee  staff   288 Sep 26 15:27 ibm_cos_sdk-2.12.0.dist-info

Following files and folders should be installed in the site-packages folder once the pip install command is executed for Ibm-cos-sdk.

Once you have this you should be able to do the following imports

import ibm_boto3
from ibm_botocore.client import Config
from ibm_botocore.exceptions import ClientError

Now coming back to the issue, I have few questions.

  1. when you say while install Ibm-cos-sdk using pip command, everything was installed except ibm_boto3, did you see any error appearing not he terminal. In case you have some error logs could you send us the same.
  2. When you say you tried cloning the GitHub code and tried the installation using setup.py, was it done for the Ibm-cos-sdk repository or some other repository.

Since after setting the complete path your import works looks like this is related to the folder location. Python might be searching for the files in a difference location and installation might have been in a separate location.

Could you run the following command and send us the output to check for all possible site-packages folder location in your machine.

python -m site

Thanks.

kevmb99 commented 2 years ago
Screen Shot 2022-09-26 at 10 27 52 AM

Here is the output from the python -m site.

arnabm28 commented 2 years ago

@kevmb99 thank you for the info. Can you please also provide the other information asked for. That will help us narrow down the problem in here.

Thanks

arnabm28 commented 2 years ago

@kevmb99 Do you have an update on this. Are you still seeing the issue?

In case the installation problem is resolved please close on the issue. In case the issue persists, could you provide the other details.

Thanks

arnabm28 commented 1 year ago

@kevmb99 Can you please close this issue, in case the installation is now working fine.

Thanks

avinash1IBM commented 1 year ago

As there is no activity in this for long time, closing this as resolved