error running script with python 2.7












0















Team, i have python2 and my scripts were running fine. I upgraded to python3 or upgrade some package which i don't remeber and now when i do run scripts it throws me error as below
uname -a
Linux userme 4.15.0-36-generic #39~16.04.1-Ubuntu SMP Tue Sep 25 08:59:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux



▶ which python
/usr/bin/python



└─ $ ▶ python version
python: can't open file 'version': [Errno 2] No such file or directory



python get-seat.py
Traceback (most recent call last):
File "get-seat.py", line 1, in <module>
import nsf_client
File "/home/dtlu/code/github/ctxrag/try_client.py", line 11, in <module>
import requests
File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line 84, in <module>
from urllib3.contrib import pyopenssl
File "/usr/local/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT

ls -ltr /usr/bin/python*
lrwxrwxrwx 1 root root 16 Nov 23 2017 /usr/bin/python-config ->
python2.7-config
lrwxrwxrwx 1 root root 16 Nov 23 2017 /usr/bin/python2-config ->
python2.7-config
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python2 ->
python2.7
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python ->
python2.7
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python3 ->
python3.5
lrwxrwxrwx 1 root root 10 May 31 2018 /usr/bin/python3m ->
python3.5m
-rwxr-xr-x 2 root root 4464368 Nov 12 08:27 /usr/bin/python3.5m
-rwxr-xr-x 2 root root 4464368 Nov 12 08:27 /usr/bin/python3.5
-rwxr-xr-x 1 root root 3492656 Nov 12 11:46 /usr/bin/python2.7
lrwxrwxrwx 1 root root 33 Nov 12 11:46 /usr/bin/python2.7-config -
> x86_64-linux-gnu-python2.7-config









share|improve this question









New contributor




AhmFM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1





    no i don't want to switch or convert my files.. i just want to run with python2.7 and my file.

    – AhmFM
    Jan 16 at 18:40
















0















Team, i have python2 and my scripts were running fine. I upgraded to python3 or upgrade some package which i don't remeber and now when i do run scripts it throws me error as below
uname -a
Linux userme 4.15.0-36-generic #39~16.04.1-Ubuntu SMP Tue Sep 25 08:59:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux



▶ which python
/usr/bin/python



└─ $ ▶ python version
python: can't open file 'version': [Errno 2] No such file or directory



python get-seat.py
Traceback (most recent call last):
File "get-seat.py", line 1, in <module>
import nsf_client
File "/home/dtlu/code/github/ctxrag/try_client.py", line 11, in <module>
import requests
File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line 84, in <module>
from urllib3.contrib import pyopenssl
File "/usr/local/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT

ls -ltr /usr/bin/python*
lrwxrwxrwx 1 root root 16 Nov 23 2017 /usr/bin/python-config ->
python2.7-config
lrwxrwxrwx 1 root root 16 Nov 23 2017 /usr/bin/python2-config ->
python2.7-config
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python2 ->
python2.7
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python ->
python2.7
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python3 ->
python3.5
lrwxrwxrwx 1 root root 10 May 31 2018 /usr/bin/python3m ->
python3.5m
-rwxr-xr-x 2 root root 4464368 Nov 12 08:27 /usr/bin/python3.5m
-rwxr-xr-x 2 root root 4464368 Nov 12 08:27 /usr/bin/python3.5
-rwxr-xr-x 1 root root 3492656 Nov 12 11:46 /usr/bin/python2.7
lrwxrwxrwx 1 root root 33 Nov 12 11:46 /usr/bin/python2.7-config -
> x86_64-linux-gnu-python2.7-config









share|improve this question









New contributor




AhmFM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
















  • 1





    no i don't want to switch or convert my files.. i just want to run with python2.7 and my file.

    – AhmFM
    Jan 16 at 18:40














0












0








0








Team, i have python2 and my scripts were running fine. I upgraded to python3 or upgrade some package which i don't remeber and now when i do run scripts it throws me error as below
uname -a
Linux userme 4.15.0-36-generic #39~16.04.1-Ubuntu SMP Tue Sep 25 08:59:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux



▶ which python
/usr/bin/python



└─ $ ▶ python version
python: can't open file 'version': [Errno 2] No such file or directory



python get-seat.py
Traceback (most recent call last):
File "get-seat.py", line 1, in <module>
import nsf_client
File "/home/dtlu/code/github/ctxrag/try_client.py", line 11, in <module>
import requests
File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line 84, in <module>
from urllib3.contrib import pyopenssl
File "/usr/local/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT

ls -ltr /usr/bin/python*
lrwxrwxrwx 1 root root 16 Nov 23 2017 /usr/bin/python-config ->
python2.7-config
lrwxrwxrwx 1 root root 16 Nov 23 2017 /usr/bin/python2-config ->
python2.7-config
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python2 ->
python2.7
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python ->
python2.7
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python3 ->
python3.5
lrwxrwxrwx 1 root root 10 May 31 2018 /usr/bin/python3m ->
python3.5m
-rwxr-xr-x 2 root root 4464368 Nov 12 08:27 /usr/bin/python3.5m
-rwxr-xr-x 2 root root 4464368 Nov 12 08:27 /usr/bin/python3.5
-rwxr-xr-x 1 root root 3492656 Nov 12 11:46 /usr/bin/python2.7
lrwxrwxrwx 1 root root 33 Nov 12 11:46 /usr/bin/python2.7-config -
> x86_64-linux-gnu-python2.7-config









share|improve this question









New contributor




AhmFM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.












Team, i have python2 and my scripts were running fine. I upgraded to python3 or upgrade some package which i don't remeber and now when i do run scripts it throws me error as below
uname -a
Linux userme 4.15.0-36-generic #39~16.04.1-Ubuntu SMP Tue Sep 25 08:59:23 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux



▶ which python
/usr/bin/python



└─ $ ▶ python version
python: can't open file 'version': [Errno 2] No such file or directory



python get-seat.py
Traceback (most recent call last):
File "get-seat.py", line 1, in <module>
import nsf_client
File "/home/dtlu/code/github/ctxrag/try_client.py", line 11, in <module>
import requests
File "/usr/local/lib/python2.7/dist-packages/requests/__init__.py", line 84, in <module>
from urllib3.contrib import pyopenssl
File "/usr/local/lib/python2.7/dist-packages/urllib3/contrib/pyopenssl.py", line 46, in <module>
import OpenSSL.SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/__init__.py", line 8, in <module>
from OpenSSL import rand, crypto, SSL
File "/usr/lib/python2.7/dist-packages/OpenSSL/SSL.py", line 118, in <module>
SSL_ST_INIT = _lib.SSL_ST_INIT

ls -ltr /usr/bin/python*
lrwxrwxrwx 1 root root 16 Nov 23 2017 /usr/bin/python-config ->
python2.7-config
lrwxrwxrwx 1 root root 16 Nov 23 2017 /usr/bin/python2-config ->
python2.7-config
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python2 ->
python2.7
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python ->
python2.7
lrwxrwxrwx 1 root root 9 May 31 2018 /usr/bin/python3 ->
python3.5
lrwxrwxrwx 1 root root 10 May 31 2018 /usr/bin/python3m ->
python3.5m
-rwxr-xr-x 2 root root 4464368 Nov 12 08:27 /usr/bin/python3.5m
-rwxr-xr-x 2 root root 4464368 Nov 12 08:27 /usr/bin/python3.5
-rwxr-xr-x 1 root root 3492656 Nov 12 11:46 /usr/bin/python2.7
lrwxrwxrwx 1 root root 33 Nov 12 11:46 /usr/bin/python2.7-config -
> x86_64-linux-gnu-python2.7-config






python dependencies python3






share|improve this question









New contributor




AhmFM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




AhmFM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited Jan 16 at 18:46







AhmFM













New contributor




AhmFM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked Jan 16 at 17:24









AhmFMAhmFM

12




12




New contributor




AhmFM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





AhmFM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






AhmFM is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








  • 1





    no i don't want to switch or convert my files.. i just want to run with python2.7 and my file.

    – AhmFM
    Jan 16 at 18:40














  • 1





    no i don't want to switch or convert my files.. i just want to run with python2.7 and my file.

    – AhmFM
    Jan 16 at 18:40








1




1





no i don't want to switch or convert my files.. i just want to run with python2.7 and my file.

– AhmFM
Jan 16 at 18:40





no i don't want to switch or convert my files.. i just want to run with python2.7 and my file.

– AhmFM
Jan 16 at 18:40










0






active

oldest

votes











Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});






AhmFM is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110348%2ferror-running-script-with-python-2-7%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes








AhmFM is a new contributor. Be nice, and check out our Code of Conduct.










draft saved

draft discarded


















AhmFM is a new contributor. Be nice, and check out our Code of Conduct.













AhmFM is a new contributor. Be nice, and check out our Code of Conduct.












AhmFM is a new contributor. Be nice, and check out our Code of Conduct.
















Thanks for contributing an answer to Ask Ubuntu!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1110348%2ferror-running-script-with-python-2-7%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

How did Captain America manage to do this?

迪纳利

南乌拉尔铁路局