Cython import module error on production machine [duplicate] - cython

This question already has answers here:
Is Python C module extension version incompatible?
(1 answer)
Importing cython generated *.so-module with another python-version or on another OS
(1 answer)
Closed 1 year ago.
I have compiled pyx codes using cython on my development machine which resulted in pyd files. import mymodulename works fine on my machine.
However, when I took my pyd files to production machine, `import mymodulename' is throwing error that module not found.
I have looked at cython-pyd-files-not-importing-through-python, however not much help. Also, my development machine has python 3.7 and production machine has 3.8 . What else I should do to make this work?

Thanks for the comments. It was python version issue. Cython needs same python version on both machines. After installing python 3.8 on my local environment and compiling , the new pyd files started working on production machine also.

Related

Unable to use LocateOnScreen function on Pyautogui (Python 3.9)

Here is my code:
import pyautogui
cord = pyautogui.locateOnScreen('chrome.png')
pyautogui.doubleClick(cord)'
However, I got this error:
I installed Pillow and imported PIL
I also installed opencv and numpy.
Through some research I realised it could be some site-package issues/ environment issues. I uninstalled and reinstalled python and updated the PATH.
please help I am at my wits end.
Known problem - i had it too. Maybe downgrade to 3.8 OR even 3.7.
I had to downgrade to 3.7 because a module in pyautoGUI made my script crash.

Using MPI4PY in FedoraScientific

Recently, I downloaded and installed Fedora Scientific 20 as I was
impressed with the list of included software. My interest in the software
is due to the inclusion of the MPI framework. I was able to compile and
execute a simple C program using mpicc and mpiexec. However, I need some
help using MPI4PY to call OpenMPI using Python code.
At the terminal prompt, if I try:
$ /lib64/openmpi/bin/mpiexec -n 2 python3 helloworld.py
The Traceback reports that an
ImportError: No module named 'mpi4py'
has been raised. The helloworld.py program was an example found online with
line 6 being from mpi4py import MPI.
Since Apper indicates that mpi4py has been installed for both Python2 and
Python3 for OpenMPI as part of the installation of Fedora Scientific, I'm not sure what might be wrong. Could somebody please advise as to how to use this package?
It sounds like there is something wrong with your environment. Perhaps mpi4py, since you have confirmed it is installed, is installed in a a strange place. Would setting PYTHONPATH help?
https://docs.python.org/2/using/cmdline.html#environment-variables

Scala Swing package not found

My Problem:
error: object swing is not a member of package scala
import scala.swing._
^
When I try to start any GUI App with Scala. What I tryed up to now: call directly by the scala command, and precompile first by scalac and fsc, nothing works.
My System: an Ubuntu 11.10 Machine, with installed OpenJDK 6, OpenJDK 7, Oracle JDK 6 and the Scala-Packe from the Ubuntu Repositories, additionally I tryed the "new" Scala from the official Scala Homepage (scala-lang). The .deb-package fails to install, but the plain files from the *.tgz file works so far.
I tried every possible combination of those Software I have installed, no one works.
The Joke: on my Windows 7 Machine, the same code (dropbox-sync) works without any problems.
Any Ideas? Did I forget something?
already many months since the original question, but since I just ran into the same, and googling showed this thread:
Looks like they separated scala swing from the core swing library. So if you're using sbt:
libraryDependencies += "org.scala-lang" % "scala-swing" % "2.10.2"
(I guess the previous answers imply that as well, really, but since I got that error and this was the fix, I'm just adding it for others' reference).
It is apparently not finding scala-swing.jar on the classpath. I'm not sure why this would be; it works on my system (still 11.04; don't like Unity). Try adding it explicitly: -cp /wherever/oneiric-ocelot/puts/scala/lib/scala-swing.jar.
If the file is not on your system, you can download it from the project webpage. (Click on the appropriate "latest release" buttons in the README, just under the title. Then download the jar.)
the easiest way to resolve this error is to either download the scala.swing package and keep it in a folder called lib in your main project folder. this way when you compile the program uing sbt or any other tool the compiler will scan the lib folder and update itself with the new package. the other way is to edit the build.sbt file by adding the following line in it
"org.scala-lang" % "scala-swing" % "2.10.2"

Node: Mysql client libraries on windows

I have installed db-mysql module on node running linux, and I have not problems with it, but when I tried to do it on windows, I don't know how to do this:
$ export MYSQL_CONFIG=/usr/local/mysql/bin/mysql_config
That is what the db-mysql's documentation page says to do
nodejsdb.org/db-mysql
without do that, I get on node:
Error: Unable to load shared library C:/Program files/nodejs/node_modules/db-mysql/build/Release/mysql_bindings.node
Do I have to copy any file from linux to windows pc?
Sorry my bad english, and thanks for reading
That library is a Native C++ wrapper, and has problems on Windows.
Try one of the pure js libraries. Some are covered off on this question
What MySQL driver for Node.js works on Windows?

MySQL++ Application error at launch

I compiled MySQL++ with no issues. When I launched some of the executables (resetdb.exe and simple1.exe) they suggest to run to test if the installation has been successful, the first error I got was that libmysql.dll was missing.
Adding its path to the PATH environment variable did not fix the problem, even after launching a new command prompt; I had to copy the DLL in the directory where MySQL++ executables are.
Now the DLL is found, but I get this error:
simple1.exe - Application error
The application was unable to start correctly (0xc000007b).
Click OK to close the application.
even launching from the command line, I get no more information than these.
Thank you for any help!
MySQL 5.5 -
MySQL++ 3.0.9 -
Windows 7 64 bits -
MINGW32 -
GCC 4.4.0
0xC000007B is a Windows error that means the executable is corrupted. It could refer either to simple1.exe or to one of the DLLs it's linking against.
Some reasons this could happen:
You're mixing toolchains in an incompatible way. In your case, you may have built simple1.exe using pieces built by MinGW GCC and pieces built by Visual C++. MinGW should be compatible with any pure C DLL built by Visual C++, including the MySQL C API DLL. However, you may have other pieces interfering. MinGW isn't compatible with VC++ at the C++ level, but then, it shouldn't have linked at all if this were your problem.
You didn't follow the MySQL C API import library build steps in README-MinGW.txt. You either missed a step, or skipped it entirely and are trying to use the import library that shipped with MySQL.
In your previous gyrations, you ended up with a corrupt object file, which got linked in. Try saying make clean all at the top level of MySQL++ to force a complete rebuild.
You're mixing versions of MySQL or MySQL++. If you have more than one version of each on the system, make sure you're consistent in their use. That is, build the C API import library from the same DLL you run the programs against, use exrun.bat to run the examples to ensure you're using the just-built version of the MySQL++ DLL instead of another you have in your PATH, etc.
Additionally, I note that you're using an older version of MySQL++. If you were on Linux, I could understand that as some distributions still ship with 3.0.9. But since you have to build MySQL++ from source with MinGW, I don't see why you're not using 3.1.0. Did you get a binary build from somewhere?
As for your PATH problem, did you restart the MinGW shell after doing this? PATH updates don't affect running programs; they keep the value they saw when they started.