How to install ipsolver in python 3.6 on Windows 10 - python

I'm going to do optimization using trust region interior point optimization.So I followed the steps mentioned in here
But while running the below code given in link
from __future__ import division
import numpy as np
from ipsolver import minimize_constrained, NonlinearConstraint, BoxConstraint
I'm getting error message as
ModuleNotFoundError: No module named 'ipsolver._large_scale_constrained'
Can you please guide me to resolve the issue?

Related

from utils.character_cnn import CharacterMapper, CharacterIndexer

I get an issue when I try to import from utils.character_cnn, I get error module utils.character_cnn what should I install to get the module
I tried installing utils module but I still in counter the same error, please assist

ModuleNotFoundError: No module named 'pycaret.time_series'

I've seen similar questions, but no solutions for this problem.
I'm using Google Colab:
!pip install pycaret
And this:
import time
import numpy as np
import pandas as pd
from pycaret.datasets import get_data
#from pycaret.time_series import TSForecastingExperiment
from pycaret.time_series import *
The last line returns the error: ModuleNotFoundError: No module named 'pycaret.time_series'
Does anyone know how to fix this?
Thanks in advance!
Please follow the instructions here: https://github.com/pycaret/pycaret#-pycaret-time-series-module-beta
Specifically, for the time being, the Time Series module needs to be installed separately in its own environment (i.e. not together with the main pycaret package), using:
!pip install pycaret-ts-alpha

Python - Unable to find assembly 'OSIsoft.AFSDK'

I am trying to import "clr" in a python script and I have an error with and without "clr" installed. If "clr" is installed, then I get the error:
AttributeError: module 'clr' has no attribute 'AddReference'
If I remove "clr" and install pythonnet (as suggested to fix the "clr" error), then I get this error:
FileNotFoundException: Unable to find assembly 'OSIsoft.AFSDK'.
at Python.Runtime.CLRModule.AddReference(String name)
My imports look like this:
import sys
sys.path.append('C:\\Program Files (x86)\\PIPC\\AF\\PublicAssemblies\\4.0\\')
import clr
clr.AddReference('OSIsoft.AFSDK')
from OSIsoft.AF.PI import *
from OSIsoft.AF.Search import *
from OSIsoft.AF.Asset import *
from OSIsoft.AF.Data import *
from OSIsoft.AF.Time import *
import pandas as pd
from datetime import datetime
It seems like I'm missing something in finding the answer. I have loaded the latest oracle client 14.1 and that folder resided in my python working script environment. thank you for any help!
Try to remove be the wrong 'clr' module. which is mixed up with the one in pythonnet.
pip uninstall clr
pip uninstall pythonnet
pip install pythonnet

ImportError Python cannot import name

I am trying to reproduce a code from a scientific publication which uses Python 2:
https://github.com/TeamErlich/dna-fountain
The code is based on Python 2 so I had to change my environment to Python 2 from Python 3. Anyways, when I ran the code I realized that Python is not able to import DNAFountain from fountain, although I successfully installed it with pip install fountain. I constantly receive this error message:
File "encode.py", line 9, in <module>
from fountain import DNAFountain
ImportError: cannot import name DNAFountain
Does anybody know why my code is not able to import DNAFountain?

Sys.path.append not loading depending on path order and package

I recently had to install for a local user on Centos7 a more recent version of python2.7(.10) than the default one (2.7.5) could not handle a task.
With one of my script, I have a weird issue. Here is the import section of my script:
#!/bin/env python2.7
import os
import sys
if not os.name=='nt':
sys.path.append('/usr/lib64/python2.7/site-packages')
sys.path.append('/usr/lib/python2.7/site-packages')
from bingads.service_client import ServiceClient
from bingads import authorization, reporting
from bingads import *
import webbrowser
from suds import WebFault
import datetime
import psycopg2
So this basically doesn't work and returns a missing module error, stating that ServiceClient cannot be found
Yet, if I comment out:
sys.path.append('/usr/lib/python2.7/site-packages')
then the module is found but then psycopg2 is not found anymore (althought it would be found without commenting the previous line...)
It really makes no sens to me... Anyone encountered this error?

Categories