Frappe installation error "AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'" - httplib2

When I install frappe ( version-13 ) on linux
when I run bench init
it gives an error
ERROR: httplib2 0.20.1 has requirement pyparsing<3,>=2.4.2, but you'll have pyparsing 3.0.0 which is incompatible.
though the installation goes through.
After that when a new site is created it gives an error
AttributeError: module 'pyparsing' has no attribute 'downcaseTokens
which is a deprecated function not available in version 3.0 but available in 2.4.2
How do I get around this issue ? Can I force install an earlier version of pyparsing ?
Regards
Hari

That python package is using a deprecated function in pyparsing.
you can force install any version of a python module as,
pip install pyparsing==2.4.2

well I think I found a Fix for the one's who wants to use the current version of Pyparsing itself. The base package that it creating a problem is httplib2. so in order to rectify you need to update the httplib2 package.
pip install httplib2

I had issues with importing tf_slim package and got the same error !
$ pip install httplib2
This will resolve the "AttributeError: module 'pyparsing' has no attribute 'downcaseTokens'" error.

Related

Can't installing azureml-sdk on Mac M1

I'm trying to install azureml-sdk in a Mac M1 with Python 3.9.15 and facing the following problems:
When I pip install azureml-sdk, it installs an old version (azureml==1.0.23)
If I run:
from azureml.core import Workspace
ws = Workspace.from_config()
I get the following error:
AttributeError: 'BasicTokenAuthentication' object has no attribute 'get_token'
And if I try to install the latest azureml-sdk version with
pip install azureml-sdk==1.48.0
I get the following error:
ERROR: Cannot install azureml-dataset-runtime because these package versions have conflicting dependencies.
The conflict is caused by:
azureml-dataprep 4.8.3 depends on azureml-dataprep-native<39.0.0 and >=38.0.0
azureml-dataprep 4.8.2 depends on azureml-dataprep-native<39.0.0 and >=38.0.0
azureml-dataprep 4.8.1 depends on azureml-dataprep-native<39.0.0 and >=38.0.0
azureml-dataprep 4.8.0 depends on azureml-dataprep-native<39.0.0 and >=38.0.0
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts
Any ideas? Thanks in advance
Regarding the first error you cited, this error is typically experienced when the provided login credentials for the Azure Machine Learning workspace are incorrect.
Verify the access rights for the workspace on the service principal you are using for authentication.
Make sure the configuration file you use for authentication is formatted correctly and has all the necessary elements.
Use the newly created service principal and configuration file to authenticate.
The second error is because these package versions have conflicting dependencies, typically experienced when there is a conflict between the dependencies of the installed packages.
You might attempt the following solutions to troubleshoot this problem:
Try downgrading or upgrading the conflicting packages' versions until you find one that works with the Azure Machine Learning SDK.
To avoid installing the dependencies, try installing the Azure Machine Learning SDK using the —no-deps parameter.
If the issue still exists, you can try deleting and then reinstalling every package linked to Azure Machine Learning.

AttributeError: module 'scipy.sparse' has no attribute 'coo_array'

Getting this error in my Jupyter Notebook
What would be the best way to fix this utilizing conda instead of pip
I've attempted conda upgrade --all and that didnt seem to work
The scipy.sparse.*_array functions were introduced with v1.8. The networkx package started requiring scipy >=1.8 with v2.7. So, either upgrade SciPy
conda install 'scipy>=1.8'
or downgrade NetworkX:
conda install 'networkx<2.7'
Part of the issue here is that, at the recommendation of a networkx developer, Conda Forge stopped explicitly requiring scipy as a dependency of networkx, and therefore there is no longer any constraint. I opened an issue on the feedstock to revisit coinstallation constraints (run_constrained specifications).
As mentioned in this Github comment, I was trying to calculate the page rank (networkx.pagerank) of a graph on Google Colab when I encountered the same error. After executing the following code, the issue was resolved for me:
!pip install --upgrade scipy networkx
A Side Note: pip install refers to installing packages and leave the package as-is if it is already installed. But the --upgrade flag instructs pip to uninstall anything which is being upgraded/replaced. For more info on this, refer this official doc.
I encountered similar error
I could solve it by installing these versions of newtorkx and scipy:
!pip install 'networkx<2.7'
!pip install 'scipy>=1.8'

Openstack/devstack Installation - The conflict is caused by: oslo-vmware 3.9.1 depends on suds-jurko>=0.6

I am trying to install devstack on Ubuntu 18.04, using the guide in https://docs.openstack.org/devstack/latest/.
Installation fails with the error,
ERROR: Cannot install cinder because these package versions have conflicting dependencies.
The conflict is caused by:
oslo-vmware 3.9.1 depends on suds-jurko>=0.6
The user requested (constraint) suds-jurko===0.6
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
I have 2 python versions on the machine
stack#stack:~/devstack$ which python
/usr/bin/python
stack#stack:~/devstack$ which python3
/usr/bin/python3
Am I missing something here?
Best Regards,
J
Just install setuptools 57.5.0
vim /opt/stack/requirements/upper-constraints.txt
like this:
#setuptools===58.2.0
setuptools===57.5.0
It works for me.
The issue is that suds-jurko is incompatible with the setuptools 58.0. You would need to downgrade to setuptools 57.5.0, e.g. pip install setuptools==57.5.0, but it's possible that devstack will upgrade it again.
The real solution is a set of upstream patches that are already in the works to fix this, but isn't merged yet (as of this post).
https://review.opendev.org/c/openstack/oslo.vmware/+/813377

ImportError: cannot import name 'STL' from 'statsmodels.tsa.seasonal'

I have this issue now, I cannot import STL from statsmodels. I've tried to uninstall statsmodels as it was recommended somewhere with a similar issue but it is not possible, at least the way I do it:
!pip uninstall statsmodels - NOT working.
It seems that the STL function from statsmodels is not included in the latest stable version of the library (0.10.2) but is in the dev version (0.11.0dev0).
You can build and install this specific version with this command: pip install git+https://github.com/statsmodels/statsmodels.git
For this you may need a c compiler if you don't already have one, everything is explained here: https://www.statsmodels.org/dev/install.html#installation-from-source
I've also found this package that seems promising: https://github.com/jrmontag/STLDecompose
Use this:
pip install statsmodels==0.12.1

'curl_version_info_data' has no member named 'libssh_version'

I need to install plotly package for R(3.3.1) in a Redhat server 5.11. It requires curl to be installed first. I downloaded the package from https://cran.r-project.org/web/packages/curl/index.html.
When I try to install the package, it gives below error:
version.c: In function 'R_curl_version':
version.c:15: error: 'curl_version_info_data' has no member named 'libssh_version'
version.c:15: error: 'curl_version_info_data' has no member named 'libssh_version'
make: *** [version.o] Error 1
ERROR: compilation failed for package 'curl'
Has anyone had the same issue before?
Thanks in advance for any suggestion.
You need to install the development version of the curl library before installing the package. Try yum install curl-devel.
One note though - whenever you run into a similar error it is typically because a development version of a library is not installed on your redhat system.
Thanks Jim for your reply.
I found the solution is to use a lower version curl package which has not included the definition for "libssh_version" in the file version.c, e.g. curl_0.9.6.tar.gz with the command:
sudo R CMD INSTALL curl_0.9.6.tar.gz
I've also tried "yum install curl-devel", but it shows the message:
This system is receiving updates from RHN Classic or RHN Satellite.
Setting up Install Process
Package curl-devel-7.15.5-17.el5_9.x86_64 already installed and latest version
Package curl-devel-7.15.5-17.el5_9.i386 already installed and latest version
Nothing to do

Resources