BitNami DjangoStack not 'self contained', cannot run application - python

I installed the Windows (32bit) BitNami DjangoStack 1.4.1.0 and elected not to install the python that came with it as I already have Python 2.7 installed.
I got the error below and also an internal server error when I clicked on the button in the introduction web page (so Appache is running ok)
enter code here
[error] mod_wsgi (pid=3990): Target WSGI script '/opt/bitnami/apps/django/scripts/django.wsgi' cannot be loaded as Python module
I found a similar question but that related to installing on Amazon. Also following through the answers it appeared that the problem is that the wsgi had been compiled against the wrong python version.
I then uninstalled BitNami and re-installed using the python version that was provided - still the same message.
I don't see how the wrong python version can be the problem if the BitNami package is self contained, i.e. comes with all the bits needed to run.
In case my previously installed version was causing the problem I remove it from the PATH environment variable.
Also the documentation for Windows seems wrong. django.conf and django.wsgi are not where the docs say they are (\Users\user\BitNami SDjangoStack projects\apps). In fact the only thing in that directory is the new project I selected on installation - no apps directory. I found the files in the BitNami directories.
Also when I typed python in the BitNami console I got python 2.7.3, not 2.7.2 which is listed in the installation guide.
I thought this package would be wonderful to help me get a production Django site running. It is now ready in the development phase to go live for testing.

What do you exactly mean with not installing Python? BitNami DjangoStack is self contained in the sense that it includes its own Python and its dependecies. Also you mentioned that you are running it on Windows but the path /opt/bitnami is the default path when installing as root in Linux. What exact options did you select during the installation?

Related

0x80070643 error while installing Python 3.6

I'm actually using Python for an audio steganography project but I have some troubles.
I searched this error code on the forum, but I found things about SQL installations and not Python.
I'm trying to re-install Python 3.6.5 after an uninstall, because of a bug with pip.
I installed Python 2.7, Python 3.6.5, Python with VS 2017, before uninstall it because it wasn't working.
However, when I'm runing the installer as an administrator, hit "customize installation", tick everything excpet "balblalblabal (this requires VS 2015 or later)", and click on "install", it tells me that :
.
I realy need Python to work and I'm now stuck ...
If anybody here could help me, it would be nice !
Thanks all,
maleik.
PS : I have the log for you :*
The log link
I found this in the log file which you have attached. Try cleaning the registry with CC cleaner and give it a try. If it still doesn't work, try installing python with web installer Python Web Installed 3.6.5.
[3DA0:2968][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to install MSI package.
[3DA0:2968][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to execute MSI package.
[2610:03A4][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to configure per-machine MSI package.
[2610:03A4][2018-12-05T20:46:18]i319: Applied execute package: core_AllUsers, result: 0x80070643, restart: None
[2610:03A4][2018-12-05T20:46:18]e000: Error 0x80070643: Failed to execute MSI package
I installed python from Microsoft store after facing this problem and it magically got installed without any error as it may have directly been installed. I don't know but try if it eorks for you too.
You need to run the installation as a local administrator.
I had the same problem installing Python version 3.9 for the first time on my Windows 10, as this same problem happens to many users trying to install Python, the best solution I accidentally, just like #MANAN AGGARWAL discovered trying to check if I already had a version of Python installed on my computer by the DOS Command Prompt, was:
Open the DOS Command Prompt (cmd) and dictate "python": if a screen shows you a version, it's clearly not the first time you've installed Python, so if you want to upgrade you should try: https: / /www.delftstack.com/en/howto/python/how-to-update-python/ But if you've never installed any version of Python, the solution lies in updating your operating system to the latest version through Windows Update, and open the command prompt and type Python, or go directly to the Microsoft Store and search for Python followed by its latest version. It works without error.
** If by chance it does not automatically install on your PC after downloading, click "install on my devices" and select your computer name.
Why can't I install Python directly from the website file? Please note that when trying to install any software/applications from outside Microsoft's trusted locations, there are high chances of user settings interfering with the installation. When coming, for example, from the Microsoft Store, a chance of success is much greater, even without having problems related to User Permission Settings.
Another important thing to point out here is that installing a lot of software from outside Microsoft's trusted platforms can cause you to change some user permissions which can have positive effects with some software and negative effects with others, even with security your own system if you don't know what you're doing.
it's simple , Try Lower Version Like 'Python 3.6' but Download web install.
install it , then install last python version.
your python will update.
I've faced same/similar problem with installing Python 3.9.12 in a clean Windows 8.1 64-bit (VirtualBoxed test environment).
I thought the issue could have been fixed in a newer version of Python, but the freshest 3.10.10 fails with same issue.
The original log isn't available any longer, but luckily it is quoted in another answer, and the following line reveals the real problem:
Applied execute package: core_AllUsers, result: 0x80070643, restart: None
My log looks the same, and if you scroll the log up, you'll discover that core_AllUsers is a UCRT MSI-installer, which is downloaded from Python site (for 3.10.10 64-bit the link may look like https://www.python.org/ftp/python/3.10.10/amd64/ucrt.msi).
If you download it manually (Python installer is smart enough to do a cleanup even if it fails, so you won't find this MSI in a local cache) and run, it will probably crash. And if it is your case, I have a simple solution - just install update KB2999226 (Update for Universal C Runtime) for your OS, which you can download from Microsoft.
I also faced the similar issue. What the trick worked for me is I installed it for the individual user (as earlier installation was for the all users).
So earlier if one has installed it for the all users then install it for the specific user and vice versa.
I know this is not the resolution of the error faced. However, this approach will install Python which is the main motive to achieve.
I encountered the same issue after installing a fresh Windows 8.1 on my PC.
I solved that by using the Python v3.9 web installation file which you can find here.
However, you can choose any other version that has a web installation file
Note: You need internet connection to use this method.

ImportError: No module named 'resource'

I am using python 3.5 and I am doing Algorithms specialization courses on Coursera. Professor teaching this course posted a program which can help us to know the time and memory associated with running a program. It has import resource command at the top. I tried to run this program along with the programs I have written in python and every time I received ImportError: No module named 'resource'
I used the same code in ubuntu and have no errors at all.
I followed suggestions in stackoverflow answers and I have tried adding PYTHONPATH PYTHONHOME and edited the PATH environment variable.
I have no idea of what else I can do here.
Is there any file that I can download and install it in the Lib or site-packages folder of my python installation ?
resource is a Unix specific package as seen in https://docs.python.org/2/library/resource.html which is why it worked for you in Ubuntu, but raised an error when trying to use it in Windows.
I ran into similar error in window 10. Here is what solved it for me.
Downgrade to the Apache Spark 2.3.2 prebuild version
Install (or downgrade) jdk to version 1.8.0
My installed jdk was 1.9.0, which doesn't seem to be compatiable with spark 2.3.2 or 2.4.0
make sure that when you run java -version in cmd (command prompt), it show java version 8. If you are seeing version 9, you will need to change your system ENV PATH to ensure it points to java version 8.
Check this link to get help on changing the PATH if you have multiple java version installed.
Hope this helps someone, I was stuck on this issue for almost a week before finally finding a solution.

Does google app engine use python 2.7.0 or 2.7.1?

What python version does app engine use?
This is related to problems I'm having on mac osx with getting pycrypto to work. Because the python version now in mac is 2.7.1. When Google says the python version for app engine is '2.7' do they mean precisely 2.7.0? Or is python 2.7.1 okay too?
Can this cause problems for my local install of pycrypto? ( which I installed with pip: sudo pip install pycrypto==2.6 )The pycrypto library works correctly, but it somehow messes up app engine running a development server. The logging doesn't show all errors or logs which I expect to appear there.
When Google says the python version for app engine is '2.7' do they mean precisely 2.7.0? Or is python 2.7.1 okay too?
Any subversion of python 2.7 works. 2.7.0 works, but I have used 2.7.6 and 2.7.10 extensively as well. So I'm sure that 2.7.1 will work too.
Can this cause problems for my local install of pycrypto? ( which I installed with pip using: 'sudo pip install pycrypto==2.6' )The pycrypto library works correctly, but it somehow messes up app engine running a development server. The logging doesn't show all errors or logs which I expect to appear there.
I know you have asked about this before but I will give you an other (better) way to include pycrypto in your appengine project.
In your app.yaml, specify the following:
libraries:
- name: pycrypto
version: "2.6" # or "latest", or "2.3"
See https://cloud.google.com/appengine/docs/python/tools/libraries27 for more info about which libraries are supported by appengine and how you can import which versions.
It seems as though you're asking the question which inspired your title, about python verson 2.7.x, as a way to get insight into your actual problem, which is related to pycrypto. Tim's answer dealt with the question of which sub-versions of 2.7.x are supported.
It appears you're using both the app.yaml libraries stanza and pip to get an instance of pycrypto. So:
Is the pip-installed pycrypto residing on your dev-box somewhere like /usr/local/lib/python-2.7, or is it in the app's folder, specifically?
When the dev-server is running, is it possible your python path has it using the pycrypto installed by pip on your system, with that pycrypto being a different version than the one in production? This might cause different behaviour on the dev-server vs. production.
...All this said, it still seems odd, as Tim has pointed out, that you should see a disruption to logging based on this. What is it you're logging, and are you using any exception handling which might be dropping the responsibility to log?
Finally, is there a setting when running the dev-server which you can use that would enable more verbosity? Try that to see if you can raise the logging level enough to make the exceptions you're looking for visible.
These are my thoughts so far on how to get out of your jam.

Which mod_wsgi Binary to download?

1) I am trying to setup a WAMPServer and am stuck on which file I need to download from the site: http://www.lfd.uci.edu/~gohlke/pythonlibs/#mod_wsgi
I am using: Windows 7(64 bit), Apache 2.4.9 and Python 2.7.
2) Also, many of the tutorials I have seen on the matter say to download a .so file. However the above link contains .whl files?
I've been using this https://stackoverflow.com/a/20128269/2268507 as a guide.
I would really appreciate it if someone could shed some light on these two matters.
Thank you for your help.
That page on the gohike site tells you to go read:
https://github.com/GrahamDumpleton/mod_wsgi/blob/master/win32/README.rst
Did you do that?
That page for mod_wsgi explains what version you should use for what. It does this in reference to the binaries that the mod_wsgi downloads list has, but if you understand what Python wheels are then you can use those from the gohike site as well.
UPDATE
Note that details at this URL are obsolete. You should use pip install as described at:
https://pypi.python.org/pypi/mod_wsgi
Once installed, run mod_wsgi-express module-config to display config you should add to your Apache configuration file to load mod_wsgi that you installed using pip install.
Yes, read the Graham's [Git] and take a look at paragraph:
"
Note that Apache Lounge never made available any Win64 VC9 binaries for Apache 2.4. This means that technically there is no combination available for correctly running mod_wsgi with a Win64 VC9 version of Python 2.6 or 2.7.
History shows that users simply don't want to accept this and don't want to understand that mixing VC9 and VC10 binaries are not guaranteed to work.
"
See that? don't use Python 2.6 or 2.7 in Win64, Apache doesn't support the module for you.
But you can still download the ".so" file in here , just found which is the best and suit for you and install it into Apache. This is the tutorial how to install mod_wsig to Apache and XAMPP. Good Luck!
Rian Hariadi, Jakarta Coding

Python: No module named core.exceptions

I'm trying to get Google AppEngine to work on my Debian box and am getting the following error when I try to access my page:
<type 'exceptions.ImportError'>: No module named core.exceptions
The same app works fine for me when I run it on my other Ubuntu box, so I know it's not a problem with the app itself. However, I need to get it working on this Debian box. It originally had python 2.4 but after AppEngine complained about it I installed the python2.5 and python2.5-dev packages (to no avail).
I saw on this Google Group post that it may be due to the version of AppEngine and just to reinstall it, but that didn't work. Any ideas?
Edit 1: Also tried uninstalling python2.4 and 2.5 then reinstalling 2.5, which also didn't work.
Edit 2: Turns out when I made AppEngine into a CVS project it didn't add the core directory into my project, so when I checked it out there literally was no module named core.exceptions. Re-downloading that folder resolved the problem.
core.exceptions is part of django; what version of django do you have installed? The AppEngine comes with the appropriate version for whatever release you've downloaded (in the lib/django directory). It can be installed by going to that directory and running python setup.py install

Categories

Resources