Install Python modules

Altair Forum User
Altair Forum User
Altair Employee
edited October 2020 in Community Q&A

Hi guys, need some help to install pandas module to work with Compose. Any ideas? Went to the local help and just saw some supported packs [below]. Does it mean that it is impossible to install other packs?

Supported Packages

  • Numpy-1.9.2
  • Scipy-0.15.1
  • Reportlab-3.1.44
  • Colorama-0.3.3
  • Ecdsa-0.13
  • Matplotlib-1.4.3 (generates plot in a Python command window)
  • Pillow-2.7.0
  • Pycrypto-2.6.1
  • PyTest-2.7.0
  • Requests-2.9.1
Tagged:

Welcome!

It looks like you're new here. Sign in or register to get started.

Answers

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited February 2018

    Hi Sandro,

         Installation of packages other than those you have mentioned in your query can be done using the details given in the installation path of Compose. The installation path is given below.

    @ C:\Program Files\Compose\2017.3\help\Compose\topics\compose\installing_python_packages_compose_t.

    For installing pandas, before doing this, you need to execute the following command in the Command prompt.

    set VS100COMNTOOLS=%1 VS120COMNTOOLS%

    Thanks,

    Sijo George

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited February 2018

    Hi Sijo,

    Thanks for replying.

    Your proposed solution didn't work. I don't have the folder 2017.3, just the 2017.1, so I followed the path and got to \topics\compose\, however, the 

    installing_python_packages_compose_t

    ins't there.

    Any other ideas?

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited March 2018

    Hi Sandro,

             I have added an image which contains the description of installing python packages in Compose. I have also attached a pdf which contains the details of installing the package 'pandas' in Compose.

    Thanks,

    Sijo George

     

    <?xml version="1.0" encoding="UTF-8"?>image.png

    Unable to find an attachment - read this blog

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2018

    Hello,

     

    I would like to follow up on this question. I am trying to install pandas module as well. I followed the instructions in the help file, but it is not working. Here are the things that I tried:

     

    I ran 'python.exe' file located at C:\Program Files\Altair\2019\Compose2019\common\python\python3.4\win64

     

    When I type 'set VS100COMNTOOLS=%1 VS120COMNTOOLS%' on the command prompt, I get an error: 'SyntaxError: invalid syntax'

     

    When I type '-m pip install pandas' on the command prompt, it again gives a syntax error. This command worked in Python terminal in PyCharm.

     

    I download the pandas module from its website. The name of the file I installed was 'pandas-0.20.3-cp34-cp34m-win_amd64.whl' When I execute '-m pip install C:\Users\bilginb\Downloads\pandas-0.20.3-cp34-cp34m-win_amd64.whl' I still get a sytax error.

     

    Could you please help me with this issue?

     

    Thank you

    Berker

     

     

  • FranckD
    FranckD
    Altair Employee
    edited November 2018

    Hello Berker,

     

    I recommend the following steps to fix the commands you mentioned :

     

     1) open a command window (MSDOS prompt)

     2) type this command : set VS100COMNTOOLS=%VS120COMNTOOLS%

     3) now go to the Python installation folder :  cd C:\Program Files\Altair\2019\Compose2019\common\python\python3.4\win64

     4) now install pandas using pip with this command :  python.exe -m pip install pandas

     

    The step 2 is optional (needed if your package requires Visual Studio compiler) and - if required -  used to point to your compiler.
    Using %VS120COMNTOOLS% assumes you are using VS 2013.

     

    Hope this helps,

    F.

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2018

    Hi Franck,

     

    Thank you very much for your response. I applied the steps that you suggested. 

     

    In the command prompt, I typed the command set VS100COMNTOOLS=%VS120COMNTOOLS%

    It did not give me any error.

    Then, I switched to Python folder in the command prompt as you instructed. Please see the attached screenshot bb1.

    Then I executed the command 'python.exe -m pip install pandas' in the command window. It tells me that I have an early version of pip (see the attached screenshot bb2). But it seems that the installation worked fine (see the attached screenshot bb3). 

     

    However, after the installation is completed, when I run the command import pandas as pd in the Python Window in Compose, I still get the same error: ImportError: No module names 'pandas' I restarted Compose and then restarted the computer, but it didn't help. 

     

    Do you have any suggestion for how I can find the reason of this issue?

     

    Thank you

    Berker

    <?xml version="1.0" encoding="UTF-8"?>bb1.PNG

    <?xml version="1.0" encoding="UTF-8"?>bb2.PNG

    <?xml version="1.0" encoding="UTF-8"?>bb3.PNG

  • FranckD
    FranckD
    Altair Employee
    edited November 2018

    Hi Berker,

     

    Actually in your screenshot 'bb3' python did not succeed to install Pandas. 

    To get a recent (or the latest) pandas, you often need to updgrade other modules to satisfy some dependencies.

     

    I just performed, starting from scratch, the following steps :

     

    1) open an MSDOS prompt (command window) as administrator

     

    2) change directory to the python/python3.4/win64 folder in the Compose 2019 installation
     

    3) run the following commands, one after the other :

    • set VS100COMNTOOLS=%VS140COMNTOOLS%

    • python -m pip install --upgrade pip

    • python -m pip install --upgrade numpy

    • python -m pip install --upgrade scipy

    • python -m pip install pandas

    The first update will updgrade pip

    The next two will update numpy and scipy (requirements for pandas - indeed the error in your screenshot bb3 seems related to numpy)

    The last one is the actual installation of pandas.  In my case it installed version 0.22 (since it was cached on my computer from an earlier download).

     

    4) Now, on the python side, we have successfull installed pandas

     

    5) Start Compose and, in the python command window, you can do  import pandas as pd

     

    Thanks,

    Franck

     

     

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2018

    Hi Fanck,

     

    Thank you very much for taking the time to prepare this detailed response. I appreciate your help. 

     

    I successfully upgraded pip, numpy and scipy. But the installation of pandas is still failing. The error that I receive is as follows:

     

    error: Microsoft Visual C++ 10.0 is required. Get it with 'Microsoft Windows SDK 7.1': www.microsoft.com/download/details.aspx?id=8279

     

    I have tried many things to resolve this issue. I installed Microsoft Windows SDK 7.1. I ran the same commands from Windows SDK 7.1 Command Prompt. But I am still getting the same error. I have many Microsoft Visual C++ versions on my computer. Attached you can see the list.

     

    I checked the online forums. Some mention  set VS100COMNTOOLS=%VS140COMNTOOLS%, which I already applied. Some suggest having Visual C++ redistributable,  which is already installed. Do you have any other suggestions to solve this issue?

     

    Thank you

    Berker Bilgin<?xml version="1.0" encoding="UTF-8"?>820098592_ScreenShot2018-11-26at10_02_27AM.thumb.png.1569aa8e09a5e04d5639d87dd435f3ab.png

  • FranckD
    FranckD
    Altair Employee
    edited November 2018

    Hi Berker,

     

    Some Python modules require Visual Studio. Pandas seem to be one of them.

     

    It looks like you installed the SDK.  But I think you need Visual Studio and the SDK.

     

    Actually, the command   set VS100COMNTOOLS=%VS140COMNTOOLS%  or    set VS100COMNTOOLS=%VS120COMNTOOLS%   is a way to tell Python/Pandas which compiler you have on your machine.

    VSXXXCOMNTOOLS is a variable created by Visual Studio when you install Visual.

    • If you install Visual Studio 2013, the variable VS120COMNTOOLS will be created for you.
    • If you install Visual Studio 2015, the variable VS140COMNTOOLS will be created for you.

    Pandas is looking for VS 10.0 and so you need to point VS100COMNTOOLS to the actual Visual Studio compiler you will decide to install.

     

     

     

     

     

  • Altair Forum User
    Altair Forum User
    Altair Employee
    edited November 2018

    Thank you, Franck. Your guidance and suggestions helped a lot. We finally solved the problem. First, we installed Visual Studio 2015. But it did not work. I was getting the same error message. Then, we were able to fix the compiler issue by downloading it separately from the Visual Studio 2010 package. We still needed to install the Visual Studio 2010 package first. However, it didn't let us install the compiler due to .Net 4.0 issue. We had a newer .Net 4.x version. We installed the compiler afterwards. We downloaded the installation file from the link below:

    https://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=4422

     

    Thank you very much again for your help. 

     

    Kind Regards

    Berker

Welcome!

It looks like you're new here. Sign in or register to get started.

Welcome!

It looks like you're new here. Sign in or register to get started.