Installation error numpy in Qpython - qpython

In Qpython which uses Python 2.7.2; I can't install the numpy module. The message I get is: command python setup.py egg_info failed with error code 2

I think it tries to install the Mac version***, which is obviously not compatible. At least, that's what it looked like when scrolling through the CLI output when issuing the pip install numpy command using the pip script.
I don't think the numpy/scipy modules are available for Qpython for Android. I think we're just going to have to wait. I've been googling this same question and I have not found an answer.
***Ok, the script says it's a version for a variety of OS', just not Android. I have no idea why pip install would download it if it wasn't compatible. It doesn't make sense, so I'm obviously missing something.

Related

Using owlqn from PyLBFGS

I have a problem with installation of PyLBFGS. I would be grateful if anyone could help me.
My problem is that I have python 3.10 in my Win10. By using pip install PyLBFGS in cmd , I have installed the package in my python. But when I want to use owlqn in the python code, I face with a error:
Thanks in advance for your help,
Regards,
Saleh
Well, I have the same problem on Ubuntu 20.04 and Python 3.9.9. What I did was dowload PyLBFGS package source and manually build it. Basically I did the following:
git clone https://github.com/larsmans/pylbfgs.git
cd pylbfgs
pip install .
Naturally, on Windows 10 you might have to adapt these steps, but this is the only way I was able to install this package. After that, the import works as expected.

lmfit packages conflicting in Windows 10 using Anaconda Python 3.7

I'm trying to use a curve fitting package (lmfit) I did use several times in former times with Python 2.7. Since I moved to Python 3.7, I'm facing some problems on running my script. The error message I get is "ModuleNotFoundError: No module named 'lmfit'".
If I try to reinstall/update the package (using whatever of the commands in https://anaconda.org/conda-forge/lmfit): it looks like there are conflicting packages in my pc. Here the screen of my prompt:
prompt after using 'conda install -c conda-forge/label/cf202003 lmfit'
Any hints on how to solve this conflict?
just install with pip install lmfit.

ModuleNotFoundError: No module named 'wagtail'. How to fix this?

I have tried to get wagtail up and running twice: once using the guide in https://engineertodeveloper.com/wagtail-developer-portfolio/ and this time using: https://docs.wagtail.io/en/v2.12.4/support.html. Both times the error comes after:
python manage.py migrate
pip freeze shows:
anyascii==0.2.0
asgiref==3.3.4
beautifulsoup4==4.8.2
certifi==2020.12.5
chardet==4.0.0
Django==3.1.8
django-filter==2.4.0
django-modelcluster==5.1
django-taggit==1.4.0
django-treebeard==4.5.1
djangorestframework==3.12.4
draftjs-exporter==2.1.7
et-xmlfile==1.0.1
html5lib==1.1
idna==2.10
l18n==2020.6.1
openpyxl==3.0.7
Pillow==8.2.0
pytz==2021.1
requests==2.25.1
six==1.15.0
soupsieve==2.2.1
sqlparse==0.4.1
tablib==3.0.0
urllib3==1.26.4
wagtail==2.12.4
webencodings==0.5.1
Willow==1.4
xlrd==2.0.1
XlsxWriter==1.3.9
xlwt==1.3.0
So I have installed wagtail (latest version)
As pointed out by Tibor at Slack, python sometimes becomes confused. Solution was to use
python -m pip
instead of just
pip

Terminal issues error message that no Django module "models" exists, but it is in the directory

I'm a motivated beginner working my way through Python Crash Course. I created a project and an app using Django. I'm unable to get the python manage.py run server command to work. This is the header of the long error message:
"Watching for file changes with StatReloader
Exception in thread Django-main-thread".
The middle includes several lines of "".
At the end, it says "from models import Activity"
"ModuleNotFoundError: No module named 'models''
There IS a module named models in the directory. This is my second exercise using Django, and the program worked earlier. I've searched the net and read everything remotely similar, but have been unable to find a solution. How can I make the program recognize a module that is there?
I think the problem was that the version of pip in the virtual environment was the python 2.7 version instead of the 3.9 version I used to create the project. It had to be upgraded using:
python3 -m pip install --upgrade pip
I also used python3 for the manage.py runserver command instead of just python.

tcms-api 5.3 package incompatible with Windows

I attempted to upgrade my tcms-api library from 5.0 to 5.3 using:
pip install tcms-api --upgrade
on a Windows 10 machine, I saw a lot of errors when trying to install the dependent package of kerberos. Even though this is old, I saw a similar set of errors. The package installation failed since the kerberos package isn't supported on Windows and I was left at tcms-api 5.0.
Please file a bug against https://github.com/kiwitcms/tcms-api.
We can do a quick fix by providing 2 package names:
tcms-api and tcms-api[kerberos]
The first one will not install the kerberos package.
The proposed workaround makes sense but changing the underlying kerberos implementation needs careful testing which isn't a quick job.
OTOH https://github.com/kiwitcms/python-social-auth-kerberos uses gssapi which seems to be the latest and most actively maintained implementation of Kerberos for Python. There is an open issue to migrate to that in tcms-api so you can contribute if you want.
As a workaround, I was able to do the following (caveat: I haven't extensively tested my installation yet):
Clone the tcms-api repo from GitHub
Edit setup.py to change the install_requires line to use 'kerberos-sspi' rather than 'kerberos'
Install the following pip packages: Setuptools, Wheel, Twine
CD to repo folder and run: python setup.py bdist_wheel
That creates a package under the dist folder
Run pip install dist\tcms_api-5.3-py3-none-any.whl
Celebrate successful package install
The steps were modified from this page.
Update:
I confirmed the things I need the API to do work with my custom package (create and update test runs). However, I'm in a situation where I don't need to specifically harden my Kiwi instance using kerberos authentication.

Resources