How to get module hgcr_ui in RhodeCode ? I have run it on my Windows box and I get an error like this:
failed to import extension hgcr-gui-qt: No module named hgcr_ui
however i can't access my repository too. I have downloaded https://bitbucket.org/glimchb/hgcr-gui too, but i still get an error like it.
RhodeCode uses it's internal equivalent of .hgrc files in database. The table rhodecode_ui, has one available extension (largefiles) you could add similar row with hgcr_ui to that table manually and that extension should now work with RhodeCode.
Make sure your Mercurial install is up to date. RhodeCode recommends a Python sandbox for itself, and that may have a different version.
Related
On windows I have built a very simple "hello world" C extension (the file hello.c from this site https://gist.github.com/physacco/2e1b52415f3a964ad2a542a99bebed8f). Using VS2015 I successfully obtain hello.dll. The problem is that I can't figure out how to import this file/module.
In the python shell (python 3.7) I have made sure that I'm in the same folder as the hello.dll. I have also made sure that sys.path() contains the folder path. But when I write "import hello" I get an error "ModuleNotFoundError: No module named 'hello'"
Does anyone has an idea of what is wrong is this very simple setup?
Update:
When trying to import a module that does not exist the ModuleNotFoundError is reported. After renaming the hello.dll to hello.pyd an ImportError is returned. So it seems like it tries to actually load the module.
Python compiled modules on Windows have the extension .pyd, not .dll. If you'd built it using setup.py the file would be built with the correct name. However, you built it yourself and gave it a name that Python doesn't recognise as a module.
In terms of the build command: you have to link it with libpython. You don't look to be doing this. The error you report is definitely one that you can get if the module is not linked against all its dependencies.
I know you don't want to use setup.py, however I'd use it at least once just to see what it does and if it works. You'll then at least have a command that you can copy with a working set of options.
I'm trying to use python language in postgresql. Something like this:
create or replace function test(_a integer) returns integer as $$
if _a%2==0:
return 'even'
elif _a%3==0:
return 'mult of 3'
else:
return _a
$$ language plpython3u
But when I run this, I get this error:
ERROR: language "plpython3u" does not exist
HINT: Use CREATE EXTENSION to load the language into the database.
SQL state: 42704
Then, I tried to create the extension of the python language by executing:
create extension plpython3u
Which tells me the following error:
ERROR: could not load library "C:/Program Files/PostgreSQL/12/lib/plpython3.dll": The specified module could not be found.
SQL state: 58P01
I checked if the plpython3.dll file is there. Then I read something about modifying the postgresql configure file by compiling postgres from the source code and adding --with python (I found some of this here).
My problem is that I don't know how to actually do this. My OS is windows server 2019 64 bits, python version is 3.7.4 and postgresql version is 12.2-1 (pgadmin 4.18).
How can I solve this?
Getting python to work with postgres seems to be version or versions dependent. I currently have postgres 9.6. and I had installed python 3.9. I had previously installed the extension plpython3u in postgres but time had gone by and I moved to another computer. When I tried to run a procedure based on Python, I got an error. I downloaded dependency walker, from here: https://www.opcsupport.com/s/article/How-do-I-figure-out-why-my-DLL-is-failing-Microsoft-Dependency-Walker or here: https://www.dependencywalker.com/. When I opened up the dependency walker, I dragged the plpython3.dll into the dependency walker, the .dll is located here: F:\pg96\lib. I then got the following screen -- below -- that seemed to indicate I needed to install a Python 3.7. I downloaded Python 3.7 from here: https://www.python.org/downloads/windows/. And my python procedures now worked.
No need to build from source, which would require that you install a C compiler, which is non-trivial on Windows.
You never told us if python3.dll was present in the directory or not, so I'll assume it was there. Then the error would indicate that a shared library that python3.dll links with is missing, most likely from Python 3. Installing Python 3 will probably solve the problem.
Context
Steps taken:
Environment Setup
I've installed protobufs via Home Brew
I've also followed the steps in the proto-bufs python folder's readme on installing python protobufs - namely running the python setup.py install command
I've using the protobuf-2.4.1 files
Coding
I have a python file (generated from a .proto file I compiled) that contains the statement, among other import statements, but I believe this one is the one causing issues:
from google.protobuf import descriptor_pb2
The above python file, I'm importing in another python file, it's
this python file that I want to write up logic for parsing the
protobufs data files I receive
Error received
I get this error when running that file:
Steps taken to fix
Searched google for that error - didn't find much
Looked at this question/answer Why do I see "cannot import name descriptor_pb2" error when using Google Protocol Buffers?
I don't really understand the above questions selected answer,I tried to run the command in the above answer protoc descriptor.proto --python_out=gen/ by coping and pasting it in the terminal in different places but couldn't get it to work
Question
How do I fix this error?
What is the underlying cause?
How do I check if the rest of my protobuf python compiler/classes are set up correctly?
I've discovered the issue. I had not run the python install instructions the first time I tried to compile this file. I recompiled the file and this issue was fixed.
I'm working to build a app to upload image to imgur on GAE with python27, I have downloaded some extra modules from github (pyimgur), which require some modules to be in the app directory which I have installed & placed it under LIB directory & I was able to eliminate each error one by one until till last one turned up, I'm not sure how to fix it, as I couldn't find any pip module for it. The error I am getting is
ImportError: No module named termios
So I do I install it? or Include it?
other module required {which I've them installed & placed it under my app directory are}
1.auth
2.decorator
3.httplib2
4.oauth2
5.pyimgur
6.requests
here's :gae error log it's on line 30
It looks like there are a number of pyimgur libraries available. I would make sure that you are using the correct one.
It looks like you are trying to use this library based on the other dependencies you have installed (decorator, oauth2, requests) https://github.com/Damgaard/PyImgur
However, there is no auth module in that library, so line 28 of your uploadimage.py file doesn't make any sense because there is no auth to import.
from pyimgur import auth
Try out the library I linked instead.
I'm trying to install and configure pyIpopt. Ipopt is already installed and the examples run fine.
From the shell, when I do import pyIpopt, I get the error:
ImportError: /***PATH***/libipopt.so.1: undefined symbol: MPI_Init
The FAQ section of the pyIpopt git project has this to offer for these kinds of errors:
Do a Google search to find the library file, and add
-lWhateverLibrary in the makefile of pyipopt.
I've googled and found this: http://www.mcs.anl.gov/research/projects/mpi/www/www3/MPI_Init.html.
I don't know how to get the library or add it to the makefile... Any assistance would be much appreciated!
Just had a similar problem on ubuntu.
Using libmumps-seq worked for me:
installed libmumps-seq-4.9.2 (just with apt-get, along side the ordinary libmumps)
in setup.py changed in the libraries list argument 'coinmumps' to 'dmumps_seq-4.9.2'
rebuilt and installed.
If I understand it correctly, the default mumps is distributed (using MPI lib which can be a world of pain), and all i needed is the sequential one, which mumps-seq provides.