Comments (5)
As suspected, Python wasn't importing the module correctly. That is because I had a file in my working directory called "oci.py".
I discovered which module python was importing by print(oci)
.
Renaming that file made oci
module being correctly imported again.
Thanks for the help and sorry for the inconvenience.
from oci-python-sdk.
I'm trying both from virtualenv and system wide libraries.
I've tried several times installing the OCI package from a local folder (downloading it from Github) but without success.
Other Python packages are working fine. Hence I don't think that my Python installation/libraries are corrupted.
In your knowledge, is there a way to check if the OCI package has been installed correctly? And what is the package that get imported?
from oci-python-sdk.
Hi @aureliocirella I do not see that we made this change. Was this code working before and it stopped working ?
Can you try importing like this. This is working for us.
from oci.config import from_file
oci_config = from_file(file_location="~/.oci/config", profile_name="DEFAULT")
from oci-python-sdk.
Hi, exactly. The problem came up suddenly, in the previous days it was working correctly.
Here's my code:
import oci
from oci.config import from_file
config = from_file(profile_name="PROFILE")
But I get the error:
Traceback (most recent call last):
File "compartment-explorer.py", line 2, in <module>
from oci.config import from_file
ModuleNotFoundError: No module named 'oci.config'; 'oci' is not a package
This is the output of pip3 list
:
pip3 list | grep oci
oci 2.112.1
Let me know if I can provide further proof.
Thank you.
from oci-python-sdk.
@aureliocirella Are you running your script inside virtualenv ? It looks like the error this time is different. It's not even recognizing 'oci' as a package. I would guess there is something wrong how the oci is installed and setup.
from oci-python-sdk.
Related Issues (20)
- audit trails in datasafe library fails to return HOT 5
- how to get the resource state in the tenancy HOT 11
- Regression: installation of oci 2.118.1 requires GCC and Python headers which are not available in all environments HOT 7
- Support Async HOT 1
- Cryptography security vulnerabilities CVE-2023-50782, CVE-2023-5678, CVE-2023-6129, CVE-2023-6237 HOT 6
- IDCS Users and group repot aren't generating fully HOT 3
- MissingHeaderBodySeparatorDefect when uploading items to OSS HOT 7
- oci.pagination.list_call_get_all_results fails when using identity domain client HOT 2
- Missing Composite Operations for Identity Domains
- Generate bypass code with python OCI HOT 2
- Packaging Metadata: Classifiers specify as supported already dead python and not mark modern versions HOT 1
- showoci stuck while running for all resources HOT 3
- resource name not getting cost analysis (Usageapi cllent) HOT 13
- Private IP addresses for the db_nodes in ExaCS is not the correct one HOT 21
- problems running in CLI OCI HOT 3
- metrics are geting 429 error when we calling the api filter maximum , minimum and average metrics HOT 6
- Issue with accessing oci.container_instances.ContainerInstanceClient response data HOT 2
- volume backups are not getting all records in this list_volume_backups api call HOT 8
- Report with properties of PDBs HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from oci-python-sdk.