我正在使用cx_oracle 7和python 3.6.7建立到oracle 11g的远程服务器上的连接。我在Ubuntu 18.04中的操作系统
我已经用libclntsh.so安装了Oracle Instant Client库,但没有得到预期的输出。
这是我用来连接到Oracle数据库的代码
connection = cx_Oracle.connect("username/password@host/port")
print (connection.version)
connection.close()
Run Code Online (Sandbox Code Playgroud)
当脚本运行时,我希望获得连接版本,而不是得到以下错误消息
文件“ script.py”,第13行,连接= cx_Oracle.connect(“ username / password @ host / port”)cx_Oracle.DatabaseError:DPI-1047:无法找到64位Oracle Client库:“ libclntsh.so:无法打开共享对象文件:没有这样的文件或目录。请参阅 https://oracle.github.io/odpi/doc/installation.html#linux获取帮助
我已经使用带有 DarkaOnLine/L5-Swagger 包的 Swagger 安装了 laravel 5.6,我已经按照安装说明进行了操作
php作曲家需要“darkaonline/l5-swagger:5.6.*”
php artisan vendor:publish --provider "L5Swagger\L5SwaggerServiceProvider"
我也设置了
L5_SWAGGER_GENERATE_ALWAYS=真
在我的环境中创建了一个控制器并添加了
/**
* @SWG\Swagger(
* schemes={"http","https"},
* host="api.host.com",
* basePath="/",
* @SWG\Info(
* version="1.0.0",
* title="This is my website cool API",
* description="Api description...",
* termsOfService="",
* @SWG\Contact(
* email="contact@mysite.com"
* ),
* @SWG\License(
* name="Private License",
* url="URL to the license"
* )
* ),
* @SWG\ExternalDocumentation(
* description="Find out more about my website",
* url="http..."
* )
* )
*/
Run Code Online (Sandbox Code Playgroud)
之后我打字
php artisan …Run Code Online (Sandbox Code Playgroud)