Newbie Developer
Newbie Developer

Reputation: 19

How to add libaries to pycharm manually

So, In pycharm(and python 3.7.4), ssl is not supported. And it keeps causing error

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\admin\AppData\Local\Temp\pip-install-reqv02n_\ssl\setup.py", line 33
    print 'looking for', f
                      ^
SyntaxError: Missing parentheses in call to 'print'. Did you mean print('looking for', f)?

So, I used the link "https://github.com/python/cpython/blob/3.7/Lib/ssl.py" to get the file and included this python file in the same folder where I want to import ssl. Would this work? or otherwise, how could I use ssl in python3? (p. s. I'm using windwos 10)

Upvotes: 0

Views: 65

Answers (2)

Sheshank S.
Sheshank S.

Reputation: 3278

In python 3, you cannot make a print statement without parenthesis. In python 2, you are able to do something like print "hello" but in python 3 you must use parenthesis, print ("hello")

If you want to use python 2, please change your virtual environment in your project interpreter to be Python 2.

Upvotes: 2

shubham
shubham

Reputation: 513

It is the error of missing parenthesis. You have to use print("looking for", f) in python 3

Upvotes: 1

Related Questions