Login  Register

Re: QuantLib on Python in PyCharm on Mac

Posted by Luigi Ballabio on May 25, 2017; 3:46pm
URL: http://quantlib.414.s1.nabble.com/QuantLib-on-Python-in-PyCharm-on-Mac-tp18304p18307.html

Where does /Users/jeffcalhou/PycharmProjects/QuantLib/QuantLib.py come from? It is the one distributed in QuantLib-SWIG-1.10.tar.gz?

Luigi


On Thu, May 25, 2017 at 5:17 PM Jeff C <[hidden email]> wrote:
I wrote a simple piece of code, but I am still getting the same error as
before if my mouse hovers over the import QuantLib as ql.

Input:
import QuantLib as ql

date = ql.Date(7, 3, 2015)
print(date)

Output:
/anaconda/bin/python3.6
/Users/jeffcalhou/PycharmProjects/QuantLib/QuantLib.py
Traceback (most recent call last):
  File "/Users/jeffcalhou/PycharmProjects/QuantLib/QuantLib.py", line 1, in
<module>
    import QuantLib as ql
  File "/Users/jeffcalhou/PycharmProjects/QuantLib/QuantLib.py", line 3, in
<module>
    date = ql.Date(7, 3, 2015)
AttributeError: module 'QuantLib' has no attribute 'Date'

Process finished with exit code 1

Instead of printing March 3rd, 2015



--
View this message in context: http://quantlib.10058.n7.nabble.com/QuantLib-on-Python-in-PyCharm-on-Mac-tp18304p18306.html
Sent from the quantlib-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
QuantLib-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/quantlib-users