lmfit packages conflicting in Windows 10 using Anaconda Python 3.7 - package

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.

Related

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.

OpenEIS with VOLTTRON

When trying to use OpenEIS in VOLTTRON, I first need to install OpenEIS.
I managed to install Python 3.4, so I can run "python3 bootstrap.py" under ~/openeis-2.x
I managed to change the get-pip link in bootstrap to https://bootstrap.pypa.io/get-pip.py
However, when I ran the command, I got a series of error messages, the first two I am trying to overcome is "import pip ImportError: No module named 'pip' " and import ensurepip ImportError: No module named 'ensurepip'"
Isn't the purpose of downlaoding get-pip from the link, so I don't need to have pip and ensurepip when I run the code?
Thanks.
OpenEIS and VOLTTRON use two different versions of python. The get-pip script is specific to VOLTTRON as it is necessary for the 2.7 version of python in order to install pip. With OpenEIS pip is already installed so it shouldn't need to get-pip.
In order to get OpenEIS and VOLTTRON working you first need to get them installed separately. Once you have them running then you can use the OpenEISHistorian from VOLTTRON to send data to the OpenEIS instance.
I hope that helps and clears up some of the confusion that you are having.

Python behave running from python2.7 rather than python3.4

When I run behave it seems to run from python2.7 and fails to find selenium, which is installed for python3.4. Do I need to configure behave to run python3.4 somewhere - I can see nothing on the behave site, or elsewhere. There are posts about using behave with python 3.4, so it is possible.
Here is what I see:
$ behave
...
File "/usr/local/lib/python2.7/dist-packages/behave/runner.py", line 304, in exec_file
exec(code, globals, locals)
File "features/steps/home_page.py", line 2, in <module>
from selenium import webdriver
ImportError: No module named selenium
I have PYTHONPATH pointing to python 3.4/dist-packages:
$ echo $PYTHONPATH
/usr/local/lib/python3.4/dist-packages
$ ls /usr/local/lib/python3.4/dist-packages/selenium
common __init__.py __pycache__ selenium.py webdriver
I have behave installed in both /usr/local/lib/pythonX.X/dist-packages where X.X is 2.7 and 3.4
Any help much appreciated.
If you install behave for Python 3.x and Python 2.7 each installation will install the script that starts Behave at the /usr/local/bin/behave location. Whichever is installed last will win the conflict because it will overwrite the other's file. (The files that go in /usr/local/lib/python<version>/dist-packages will be fine because <version> is different in each case.)
One way to fix this is to settle on installing Behave only on Python 3. Uninstall the Python 2.7 version and reinstall the Python 3 version, and it should work.
If you do need both versions for different projects then you should use virtualenv to create Python installations for the various projects you are working on. This is what I've settled on for my own projects.

Installation error numpy in 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.

Resources