I have Apache Livy installed. Got this error when submit my code to Livy. How to change default Python Version in Apache Livy?
Exception: Python in worker has different version 3.5 than that in driver 2.6, PySpark cannot run with different minor versions
import sys
print(sys.version)
{'id': 2, 'state': 'available', 'output': {'data': {'text/plain':
'2.6.6 (r266:84292, Jul 23 2015, 15:22:56) \n[GCC 4.4.7 20120313 (Red
Hat 4.4.7-11)]'}, 'status': 'ok', 'execution_count': 2}}
Thanks
Related
I have a Python project that uses the keras Library.
Now I want to transfer this to sqlserver ml service, but the Python sqlserver version is 3.7.1.
Is there a way to update the built-in version of Python in sqlserver?
EXECUTE sp_execute_external_script
#language = N'Python'
, #script = N'
import sys
print(sys.version)'
result:
STDOUT message(s) from external script: 3.7.1 (default, Dec 10 2018, 22:54:23) [MSC v.1915 64bit (AMD64)]
Platform: Excess onDemand (EoD) with Red hat version6.10
Here I have launched spyder3 application and spyder3 comes up with black display.
I even can not see its toolbar.
I suspect this is pyqt problem and but dont know how to debug it below are details
Python 3.6.4 (default, Jan 31 2018, 22:47:26)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-18)] on linux
>>> >>> >>> PYQT_VERSION = 329473
PYQT_VERSION_STR = 5.7.1
QOpenGLVersionProfile = <class 'PyQt5.QtGui.QOpenGLVersionProfile'>
QT_VERSION = 329473
QT_VERSION_STR = 5.7.1
I can't run my python programs in pycharm. I installed python3, pycharm and anaconda. I can open the project and write python code, but can't run the program in pycharm. I can use the terminal to run my program and it works fine. Any ideas how to use the right interpreter? Where can I find it? BTW I work with a mac.
When I try to add an interpreter I can add an Virtualenv Environment, Conda Environment or System Interpreter. When I click on System interpreter and choose one, it wont work. I tried to find my python version with the terminal and use it in pycharm, but it wont do anything.
Thats what I see:
entire screen
The icon also seems weird (red cross):
weird icon
Greetings, Stefan
Inspect your conda python installation via:
$ conda info
Mine is: /root/miniconda, so basic grepping shows what pythons do I have:
root#d03107c14a07:/notebook# ls -al /root/miniconda/bin/ | grep python
-rwxrwxr-x 1 root root 129 Apr 16 16:20 ipython
-rwxrwxr-x 1 root root 129 Apr 16 16:20 ipython2
lrwxrwxrwx 1 root root 9 Apr 16 16:20 python -> python2.7
-rwxrwxr-x 1 root root 1689 Apr 16 16:20 python-config
lrwxrwxrwx 1 root root 9 Apr 16 16:20 python2 -> python2.7
-rwxrwxr-x 1 root root 10302 Dec 21 2016 python2.7
And running it like below shows it works:
root#d03107c14a07:/notebook# /root/miniconda/bin/python
Python 2.7.13 |Anaconda 4.4.0 (64-bit)| (default, Dec 20 2016, 23:09:15)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-1)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks and https://anaconda.org
>>>
We have the path, for me it's: /root/miniconda/bin/python
So, as we have it localized, we need to set it up with our Pycharm.
Go to Settings/Preferences and into Project interpreter, choose a settings wheel and Add - On the left you've got three options, choose Conda, your env might be found automatically, but if it isn't then you have the path to paste ;)
Official docs ref
conda info ref
Im trying to do a simple Ansible script to attach a volume in EC2
- ec2_vol:
instance: XXXXXX
volume_size: 5
device_name: sdd
When running I get the following error
msg": "Region eu-central-1 does not seem to be available for aws
module boto.ec2. If the region definitely exists, you may need to
upgrade boto or extend with endpoints_path"
When I check that eu-central-1 is accesible via python boto... it is there:
$ python
Python 2.7.12 (default, Nov 19 2016, 06:48:10)
[GCC 5.4.0 20160609] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import boto.ec2
>>> boto.ec2.regions()
[RegionInfo:us-west-1, RegionInfo:us-east-1, RegionInfo:ap-northeast-1, RegionInfo:ap-southeast-2, RegionInfo:sa-east-1, RegionInfo:ap-northeast-2, RegionInfo:us-east-2, RegionInfo:ap-southeast-1, RegionInfo:ca-central-1, RegionInfo:cn-north-1, RegionInfo:us-west-2, RegionInfo:us-gov-west-1, RegionInfo:ap-south-1, RegionInfo:eu-central-1, RegionInfo:eu-west-1, RegionInfo:eu-west-2]
Here are the versions of my tools
ansible 2.3.2.0
aws-cli 1.11.151
Python 2.7.12
Linux 4.4.0-93-generic
botocore 1.7.9
boto 2.48.0
pip 9.0.1
I already check most of the things I can think of and even reproduce it on another virtual machine with vagrant and it gives me the same error..what else can I check?
Do you run this with connection: local? – Konstantin Suvorov 6 hours
ago
Answer from the comments:
Do you run this with connection: local?
Cloud modules like ec2_vol are (usually) supposed to be executed from localhost (where all required libraries and credentials are stored).
I installed Python 2.7 today using:
./configure --prefix=/home/zhanwu/local --enable-shared --enable-profiling --with-pydebug
make install
Then I keep getting something like "[37745 refs]" on screen after each function call:
[zhanwu#cluster ~]$ ~/local/bin/python
Python 2.7.1 (r271:86832, Jun 16 2011, 17:45:05)
[GCC 4.1.2 20080704 (Red Hat 4.1.2-44)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
[37745 refs]
>>> print 'test'
test
[37745 refs]
>>> sys.exit()
[18048 refs]
[zhanwu#cluster ~]$
What does those numbers mean? Anything wrong here and can I get rid of them?
uname -a result:
[zhanwu#cluster ~]$ uname -a
Linux cluster.xxx.xxx.xxx 2.6.18-128.1.14.el5 #1 SMP Wed Jun 17 06:38:05 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
You get these because you configured the build with --with-pydebug. They denote the number of references Python is currently keeping track of. To get rid of them, configure without --with-pydebug.