I am trying to install Python 3 on a AIX server.
I got the Python 3 RPM file for AIX from here.
There were few dependencies that needed to be installed before installing Python, but I chose to install it without having installed any dependency through nodeps.
Now when I execute a Python3 command, I get the following errors:
It says cannot load module /opt/freeware/lib64/libpython3.5m.so but the file does exists in that directory.
Both LIBPATH & LD_LIBRARY_PATH are set to lib64.
Edit: Adding the output of lslpp -L rmp.rte command
The issue has been resolved now :)
I downloaded and installed below 2 dependencies
libgcc
gettext
I need not had to downgrade RPM or install and use yum to download required dependencies.
Download 3.0.5.51 from here
After download execute the following command on the server as root:
# installp -acFXYd rpm.rte.3.0.5.51 all
This command should downgrade your RPM to 3.0.5.51 and make it usable.
Related
I am trying to update mod_wsgi, and there is a issue between cryptacular and crypt.h, which is raising an error during installing mod_wsgi. Thankfully, the owner of cryptacular made a workaround. The version with the workaround is not the version on its dowload page or I can install with:
pip install cryptacular
So, I want to specify where pip is going to get cryptacular. The address for SSh is
ssh://hg#bitbucket.org/dholth/cryptacular
And, the commit name is cb96fb3. I tried
pip install hg+ssh://hg#bitbucket.org/dholth/cryptacular.git#cb96fb3
and I get an error message:
Error [Errno 2] No such file or directory: 'hg': 'hg' while executing command hg clone --noupdate -q ssh://hg#bitbucket.org/dholth/cryptacular.git /tmp/pip-req-build-xf6ubrkd
Cannot find command 'hg' - do you have 'hg' installed and in your PATH?
Admittedly, I do not have a hg installation. What to do? Which pages should I read??
Mercurial does not currently support Python 3.6, so I could not install it. I found a workaround by downloading tar.gz and install it with Pip.
Files of a project's particular commit on Bitbucket is located on:
https://bitbucket.org/<username>/<project name>/get/<commit name>.tar.gz
So, if you want to get it via terminal you do:
wget "https://bitbucket.org/<username>/<project name>/get/<commit name>.tar.gz"
Then, you unpack the tar.gz and install the package by Pip by:
pip install pathtothefile/<commit name>.tar.gz
You'll need to install hg, according to the instructions for your specific operating system: https://www.mercurial-scm.org/
The SSH URL there also should not include .git because that repository isn't in Git.
I am trying to install a python package that is available on github, but am unsure how to do so. This is the package: https://github.com/Jefferson-Henrique/GetOldTweets-python.
Could someone please provide me clear and step-by-step instructions on how to do this installation? None of the current answers are clear enough for me. I have tried the following command prompt command, but it is not working. I have git installed.
pip install git+https://github.com/Jefferson-Henrique/GetOldTweets-python.git
Error:
Cloning https://github.com/Jefferson-Henrique/GetOldTweets-python.git to c:\users\haris\appdata\local\temp\pip-ocsu8r-build
Error [Error 2] The system cannot find the file specified while executing command git clone -q https://github.com/Jefferson-Henrique/GetOldTweets-python.git c:\users\haris\appdata\local\temp\pip-ocsu8r-build
Cannot find command 'git'
git isn't installed via pip. It's a regular package that you'll want to install by doing apt install git, most likely as root.
You’ll need to install the package outside of pip since it’s not a python package. Conda install will work if you have anaconda or miniconda , or apt get install if you’re on a Linux system. Once you have git, run got clone package_name after navigating to the desired directory and you should be good to go.
I am working on CentOS machine which cannot connect to internet, for some reasons I need to install a python module psutil, so I got psutil-2.1.3 package but not there is no clear instruction how manually one can install it in centOS system
This is usually pretty simple:
Got to PyPi
Download the .whl file for your Python version and copy it to your server
Run pip install path/to/wheel.whl, depending on your seetings you might need to install this with sudo or from a virtual environment
???
Profit!
After installing OpenSSL, downloading the pre-built Swig executable, and ensuring the openssl libraries are located in the default c:\pkg, pip install m2crypto results in:
...
C:\Program Files (x86)\gfortran\bin\gcc.exe -mno-cygwin -mdll -O -Wall -IC:\Pyth
on27\include -IC:\Python27\PC -Ic:\pkg\include -Ic:\users\evbo\appdata\local\tem
p\pip_build_evbo\m2crypto\SWIG -c SWIG/_m2crypto_wrap.c -o build\temp.win32-2.7\
Release\swig\_m2crypto_wrap.o -DTHREADING
gcc: error: unrecognized command line option '-mno-cygwin'
error: command 'gcc' failed with exit status 1
It seems the binary installer solution for M2crypto is no longer available and I don't see any mistakes I've made based on the M2crypto install doc.
How might I resolve this install issue? Is there a dependency on older versions of GCC?
I got lucky - there's an unofficial binary installer in lieu of chandlerproject.org/bin/view/Projects/MeTooCrypto being down:
https://github.com/saltstack/salt-windows-install/blob/master/deps/win32-py2.7/M2Crypto-0.21.1.win32-py2.7.msi
This answer is based on the GitHub comment at https://github.com/iOSForensics/pymobiledevice/issues/25#issuecomment-576119104, for a Python module that requires m2crypto.
Some builds for m2crypto for specific versions of Python are available from their CI: https://ci.appveyor.com/project/m2crypto/m2crypto/history. Try selecting a version, selecting a job that matches your Python version, then going to the "Artifacts" tab and downloading an installer. To install a .whl file, see step 11 of my build tutorial below.
M2Crypto-0.35.2.win-amd64-py3.8.zip is the m2crypto module that I have built on Windows 10 x64, Python 3.8.1. It should work on any x64-based version of Windows with any version of Python 3.8.X.
However, if you are unable to find a build that matches your Python version and system type and architecture, you may need to manually build m2crypto. I adapted the build steps from their CI build scripts: https://gitlab.com/m2crypto/m2crypto/blob/master/appveyor.yml. I built the module by doing the following:
Install the latest Build Tools for Visual Studio 2019. See https://visualstudio.microsoft.com/downloads/ under "All Downloads" -> "Tools for Visual Studio 2019". This direct link was active as of this writing: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=BuildTools&rel=16
In the installer, select "C++ Build Tools", install, and reboot if necessary.
Install the latest full (not Light) OpenSSL for your architecture (Win64/Win32). Current version as of this writing is 1.1.1d. Make note of the directory to which you install OpenSSL. https://slproweb.com/products/Win32OpenSSL.html
In PowerShell, install the Chocolatey package manager. I used this command from their website: Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
Install swig with Chocolatey (in PowerShell). choco install -r -y swig
Install the pywin32 dependency. Run pip install pywin32. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.
Get the latest m2crypto code. If you have git installed, run git clone https://gitlab.com/m2crypto/m2crypto. Otherwise, download and extract the code from GitLab: https://gitlab.com/m2crypto/m2crypto/-/archive/master/m2crypto-master.zip
Use cd to change into the directory m2crypto was cloned/extracted to.
Assuming python launches your desired Python interpreter version, run python setup.py build --openssl="C:\Program Files\OpenSSL-Win64" --bundledlls, replacing C:\Program Files\OpenSSL-Win64 with the directory to which you installed OpenSSL. (On some systems you can use the py launcher to specify a Python version to use, run py -h for more information.)
Generate the installable files. python.exe setup.py bdist_wheel bdist_wininst bdist_msi.
Install the module. cd into the dist directory and run pip install M2Crypto-0.35.2-cp38-cp38-win_amd64.whl, replacing the filename with the generated .whl file. If you have problems, try first running pip install wheel. To get pip to target a specific Python installation, try launching it using py -[version] -m pip install [module]. Alternatively, you can run the generated .exe or .msi installer. Note: you may need to use an elevated (administrator) PowerShell to install Python modules.
The https://gitlab.com/m2crypto/m2crypto project provides Windows builds of M2Crypto.
You can find wheels for current Python versions from their AppVeyor builds at https://ci.appveyor.com/project/m2crypto/m2crypto.
For example, to install M2Crypto 0.37.1 from https://ci.appveyor.com/project/m2crypto/m2crypto →
https://ci.appveyor.com/project/m2crypto/m2crypto/builds/37187357/job/5c56adinoe9l8kng/artifacts with pip for 64-bit Python 3.8, run:
pip install \
https://ci.appveyor.com/api/buildjobs/5c56adinoe9l8kng/artifacts/dist/M2Crypto-0.37.1-cp38-cp38-win_amd64.whl
NB! The artifacts may expire in AppVeyor, see this bug for updates.
It's late 2019 and installing M2Crypto is still a pain! After a ton of Googling, finally got it down to the steps below:
pip install wheel
pip install M2CryptoWin32
Using a fresh Python 2.7.17 32bit install on Windows 10. You might need install http://aka.ms/vcpython27 first.
I'd imagine one should use M2CryptoWin64 instead if you've installed 64-bit Python.
in windows, (python versions 3.7 | 3.8 | 3.9 | 3.10) you can download whl file from here and install it with this command:
python install M2Crypto-0.38.0-cp310-cp310-win_amd64.whl
replace current whl file name.
1~11: https://stackoverflow.com/a/59817750
12: install M2Crypto.whl and adb in one command
pip install M2Crypto-0.38.0-cp310-cp310-win_amd64.whl adb
I've installed uWSGI using pip and start it up with an XML to load my application. The XML config contains <plugin>python</plugin>. On my new server it leads to an error:
open("./python_plugin.so"): No such file or directory [core/utils.c line 3321]
!!! UNABLE to load uWSGI plugin: ./python_plugin.so: cannot open shared object file: No such file or directory !!!
I can find the .c and the .o versions:
sudo find / -name 'python_plugin.c'
/srv/www/li/venv/build/uwsgi/build/uwsgi/plugins/python/python_plugin.c
/srv/www/li/venv/build/uwsgi/plugins/python/python_plugin.c
sudo find / -name 'python_plugin.o'
/srv/www/li/venv/build/uwsgi/build/uwsgi/plugins/python/python_plugin.o
/srv/www/li/venv/build/uwsgi/plugins/python/python_plugin.o
sudo find / -name 'python_plugin.so'
But no .so found. My previous system had a uwsgi install through apt-get, but that's really old (and I'm quite sure it uses the pip installed uwsgi normally, but maybe not for shared objects then?)
Some background info:
Ubuntu 12.0.4 LTS
Python 2.7 (virtualenv)
I've installed uWSGI in my venv, using the normal pip install uwsgi (no sudo)
So I'm a tad clueless :( I can't be the only person in the world to have this, right? Should I compile the .so objects myself? (If so, how?) Or is there another great solution?
Distros should package uWSGI in a modular way, with each feature as a plugin. But when you install using language specific ways (pip, gem...) the relevant language is embedded, so you do not need to load the plugin
For anyone that is having trouble with this, basically you need to remove lines that state your plugin from your configuration files if you change from a distro package to a pypi or gem install. I was previously using the Ubuntu/Debian package for uwsgi, but it was old so I upgraded to use pip instead.
So, in my configuration .ini file, I had the following line:
plugin = python
Removing that line fixes the problem.
Maybe you forgot this command
$ apt-get install uwsgi-plugin-python
If you're using Python3, try this command instead:
$ apt-get install uwsgi-plugin-python3
Install all available plugins: sudo apt-get install uwsgi-plugins-all
As of 6/2018 the yum package name was updated from uwsgi-plugin-python to uwsgi-plugin-python2 https://src.fedoraproject.org/rpms/uwsgi/pull-request/4#
The new install command is therefore yum install uwsgi-plugin-python2