I am having some problems in making OpenOPC to work with Python 3.6. The environment I am working in is a Windows 2012 Server. I have installed Matrikon OPC Server to test. I have both Python 2.7 and 3.6 installed through the packages Anaconda 2 and Anaconda 3. In Python 2.7 it is working fine. For Python 3.6 I installed following the instructions in this site https://pypi.org/project/OpenOPC-Python3x/. When I try to creat a open_client to the localhost
opc = OpenOPC.open_client('localhost')
I receive the following error message:
File "C:\ProgramData\Anaconda3\lib\site-packages\Pyro4\message.py",
line 152, in from_header raise errors.ProtocolError("invalid data or
unsupported protocol version") ProtocolError: invalid data or
unsupported protocol version
It seems that there is a compatibility problem with the Pyro4 package. Currently it is in the release 4.73. The miminun version requeired by the OpenOPC package is 4.61. I tried to install this version but it didn't work also.
Does any one have seen a similar problem?
I have found the problem. I was using the openOPCService from Python 2.7. After I installed the correct version It start working. At least partially.
Related
I have installed python 3.8.3 in windows 8/64 bit.. I need to start with pytest...path has been set properly... In Pycharm I am getting
Attribute error : module "pytest" has no attribute "hookimpl"
All the plugins installed as per the latest version
Pytest doesn't supports Python 3.8 yet.
Supported versions for Pytest
Python 3.5
Python 3.6
Python 3.7
PyPy3
Create a new virtualenv in Pycharm with these versions. If you don't know how here is a link for you.
Pycharm Configuring Python Interpreter
Also if you are interested you can find more info about Pytest Installation
There appears to be an issue with a Magic String here. Make sure you dont have any file named identically to any internal python code. I changed my package name from 'pytest' to 'pytestdemo' and this error was resolved.
Check your pytest project/package name, it should not start with 'Test'. I got same issue when project/package name was "Test". Changing the project/package name solved the issue.
I have installed the latest version of IBM SPSS Statistics(Version 26) which has pre installed python 3.4 and 2.7. i am trying to use version 3.4 python. i am able to import modules like pip , sys , os etc. i tried pandas the same way. i am unable to do so. getting error no module found. Hence going through our forum and IBM support did the following changes.
received the following error
1) tried pointing the site-packages via
import sys
# Assuming windows and standard python folder here.
sys.path.append(r"D:\Python34\Lib\site-packages")
2) changed the path in the settings of SPSS
3) Tried installing pip in the below folder as suggested in the forum but got message i have already installed the updated version.
C:\Program Files\IBM\SPSS\Statistics\Subscription\Python3
4) following versions of python were installed
have tried what i could. Need your expertise help to fix the same which will help me to install/use modules needed for SPSS. Thanks.
This is going to be painful to explain, I'll do my best.
As far as I can tell, you're on windows. Usually when we need a new package, we just open cmd and type pip install xxx (assume you added python to path when installing it). The reason that this works, is because when you type pip install xxx in cmd, windows recognize pip to be a command because python path is in system variables. Windows know that I can execute pip install with this python path.
However for SPSS python (3.4), that python had a different path in the system. Thus when you only have the 3.7 or 3.8 python in path, windows cannot install package to you 3.4 python, and I'm not sure if you can have more than one python path in system.
In order to fix this, you need to first figure out what's the path to your 3.4 python, then in this page you can follow the instruction to remove your 3.7 or 3.8 python in path, and add your 3.4 path, then you can do pip install xxxx for whatever package you want
I did the same thing with a arcgis python distribution, hope this works for you. If the attached page does not work, just google add python path to windows and look for a instruction that works on you PC
Oh and the reason that you can import pip, sys and some other package but not pandas, is because python is 'battery included', it comes with tons of packages pre-installed for additional functionality, but pandas is not one of them.
Fixed it since my ananconda had version 3.7 .i created virtual environment and installed 2.7 python with anaconda package. Pointed SPSS to the 2.7 folder and was able to import pandas.
I am trying to get jupyterlab working using an environment handled by miniconda. However, starting from a fresh environment using python 3.8.0 and simply doing
conda install -c conda-forge jupyterlab
First lead me to an asyncio related error. I was able to solve it using this answer.
Now I am facing a DLL import error :
File "C:\Users\XXXX\AppData\Local\Continuum\miniconda3\lib\site-packages\zmq\backend\cython\__init__.py", line 6, in <module>
from . import (constants, error, message, context,
ImportError: DLL load failed: The specified module could not be found.
And I can't solve this. I tried using python 3.6.0 instead of 3.8.0. This did not work.
Any idea ? I am using Windows 10 build 1809 64 bits system.
I am running QGIS on Linux Fedora. Everything was fine until I upgraded to Fedora 29. Now, each time I launch QGIS or run a python script, I have the following message:
RuntimeError: the PyQt4.QtCore module failed to register with the sip module
after I import qgis._gui. I'm not sure what it means. Is it a problem with my sip version, some path to fix? I am running QGIS 2.18.20, sip-4.19.13 and Python 2.7.15.
Thanks
After unsuccessful debugging and googling about the very same issue, I've upgraded to 3.4 version from copr repository:
dnf copr enable dani/qgis
install qgis python3-qgis
Now python works and I can QGIS again, seems the developers are not too keen to solve 2.18 version errors.
I'm having trouble importing cx_Oracle into python3 on debian 7.11. I know it's old-stable, but I am restricted to this version until we migrate some services in production to servers with newer debian. The error I'm getting follows:
ImportError: /usr/local/lib/python3.2/dist-packages/cx_Oracle.cpython-32mu.so: undefined symbol: PyUnicode_GET_LENGTH
Python 3 was installed from official wheezy repos, no third parties. cx_oracle was installed using pip-3.2. Please point me in right direction.
It sounds like you are trying to use a newer version of cx_Oracle with an old version of Python. You'll want to try a newer version of Python (which you'll have to download and compile yourself) or you'll want to try an older version of cx_Oracle that still had support for Python 3.2.