install on Mac via pip

141 views
Skip to first unread message

Cheng-Lung Wu

unread,
Jan 25, 2019, 5:25:42 AM1/25/19
to Biogeme
Hi all,
I'm new to Biogeme and am trying to install in on my MacBook Pro for the first time. I've got pip up to date (version 18) but when I install biogeme, I got the following:

----------------------------
Collecting biogeme
    Complete output from command python setup.py egg_info:
    Using Cython
    Please put "# distutils: language=c++" in your .pyx or .pxd file(s)
    Warning: Extension name 'biogeme.cbiogeme' does not match fully qualified name 'src.cbiogeme' of 'src/cbiogeme.pyx'
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "/private/var/folders/x9/1ns_wfrn2kb4tspbjq4ds1gm0000gp/T/pip-install-18nlxu6q/biogeme/setup.py", line 117, in <module>
        exec(open("biogeme/version.py").read())
      File "<string>", line 2, in <module>
    ModuleNotFoundError: No module named 'unidecode'
    
    ----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /private/var/folders/x9/1ns_wfrn2kb4tspbjq4ds1gm0000gp/T/pip-install-18nlxu6q/biogeme/
----------------------------

Any ideas? I don't have Xcode on my MacBook, though.

cheers,

Richie

Michel Bierlaire

unread,
Jan 25, 2019, 5:27:37 AM1/25/19
to wuche...@gmail.com, Michel Bierlaire, Biogeme
The precompiled version for Mac is for python 3.7.0. If you have a different version of python, pip tries to install it from sources. In that case you need Xcode. 



--
You received this message because you are subscribed to the Google Groups "Biogeme" group.
To unsubscribe from this group and stop receiving emails from it, send an email to biogeme+u...@googlegroups.com.
To post to this group, send email to bio...@googlegroups.com.
Visit this group at https://groups.google.com/group/biogeme.
For more options, visit https://groups.google.com/d/optout.

Remco de Grave

unread,
Jan 25, 2019, 7:35:46 AM1/25/19
to michel.b...@epfl.ch, wuche...@gmail.com, Biogeme
When I got this error I solved it by installing the package unidecode (>> pip install unidecode)
Not fully confident that this is the way to go however as I run into Xcode issues later on. I do not want to install python 3.7 as many libraries are not updated for it yet. Now trying to see if I can get biogeme working by installing it on linux using a virtual machine…

Cheers
Remco

Cheng-Lung Wu

unread,
Jan 27, 2019, 5:19:53 AM1/27/19
to Biogeme
Thanks a lot, Michel. It worked after updating to Python 3.7 on my Mac. ^_^

Cheng-Lung Wu

unread,
Feb 2, 2019, 5:55:47 AM2/2/19
to Biogeme
Hi,

Just a note after my successful installation with Python 3.7. This works well with Biogeme but the upgrade of Python to 3.7 killed my TensorFlow. The current Python 3.7 doesn't (fully) support TensorFlow (1.12). So I ended up installed Python 3.6 and TensorFlow in a separate environment. I should have installed Python 3.7 in a new environment with Biogeme!

cheers,

W.


On Friday, 25 January 2019 21:27:37 UTC+11, Michel Bierlaire wrote:

Michel Bierlaire

unread,
Feb 2, 2019, 9:50:38 AM2/2/19
to wuche...@gmail.com, Michel Bierlaire, Biogeme
Thanks.

Note that it should also be possible to install biogeme from sources, but it may require some “hacking”. 
Reply all
Reply to author
Forward
0 new messages