Hello everyone,
Is it possible to use the pandas package in ChimeraX? I tried opening a Python script containing the line 'import pandas', but I get the error: 'ModuleNotFoundError: No module named 'pandas''.
Kind regards, Ilse
Hi Ilse, You can install pandas into ChimeraX's Python using 'pip install' as described in this mailing-list message: https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2020-June/001216.html https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2020-June/001216.html . The caveat is that though this will work on all platforms, the actual later "Import pandas" will fail on at least some Linux platforms because some of our Linux installers don't include the bz2 module in their Python, which pandas depends on. I will add you to the cc list for the ticket we have open for this problem, in case it matters to you.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 9, 2021, at 3:09 AM, Lagerwaard, I.M. (Ilse) via ChimeraX-users chimerax-users@cgl.ucsf.edu wrote:
Hello everyone,
Is it possible to use the pandas package in ChimeraX? I tried opening a Python script containing the line ‘import pandas’, but I get the error: ‘ModuleNotFoundError: No module named 'pandas'’.
Kind regards, Ilse _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu mailto:ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
Hi Eric,
Thank you for the reply! Unfortunately, even though I followed your instructions and do have the bz2 module (I use Windows), I still get the same error. I can ‘import pandas’ in ChimeraX’s Python, but not from within the application itself. Do you have any idea what else might be going on?
Ilse
Van: Eric Pettersen pett@cgl.ucsf.edu Verzonden: 09 June 2021 19:12 Aan: Lagerwaard, I.M. (Ilse) i.m.lagerwaard@students.uu.nl CC: chimerax-users@cgl.ucsf.edu Onderwerp: Re: [chimerax-users] using pandas
Hi Ilse, You can install pandas into ChimeraX's Python using 'pip install' as described in this mailing-list message: https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2020-June/001216.html . The caveat is that though this will work on all platforms, the actual later "Import pandas" will fail on at least some Linux platforms because some of our Linux installers don't include the bz2 module in their Python, which pandas depends on. I will add you to the cc list for the ticket we have open for this problem, in case it matters to you.
--Eric
Eric Pettersen UCSF Computer Graphics Lab
On Jun 9, 2021, at 3:09 AM, Lagerwaard, I.M. (Ilse) via ChimeraX-users <chimerax-users@cgl.ucsf.edumailto:chimerax-users@cgl.ucsf.edu> wrote:
Hello everyone,
Is it possible to use the pandas package in ChimeraX? I tried opening a Python script containing the line ‘import pandas’, but I get the error: ‘ModuleNotFoundError: No module named 'pandas'’.
Kind regards, Ilse _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edumailto:ChimeraX-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimerax-users
I've had this problem before. The root cause turned out to be that "/path/to/ChimeraX/python3.8 -m pip install --user" installed to the Python user directory rather than the ChimeraX user directory. Try running:
"C:\Program Files\ChimeraX\bin\ChimeraX-console.exe" -m pip install --user pandas ________________________________ From: ChimeraX-users chimerax-users-bounces@cgl.ucsf.edu on behalf of Lagerwaard, I.M. (Ilse) via ChimeraX-users chimerax-users@cgl.ucsf.edu Sent: 10 June 2021 09:27 To: ChimeraX Users Help chimerax-users@cgl.ucsf.edu Subject: Re: [chimerax-users] using pandas
Hi Eric,
Thank you for the reply! Unfortunately, even though I followed your instructions and do have the bz2 module (I use Windows), I still get the same error. I can ‘import pandas’ in ChimeraX’s Python, but not from within the application itself. Do you have any idea what else might be going on?
Ilse
Van: Eric Pettersen pett@cgl.ucsf.edu Verzonden: 09 June 2021 19:12 Aan: Lagerwaard, I.M. (Ilse) i.m.lagerwaard@students.uu.nl CC: chimerax-users@cgl.ucsf.edu Onderwerp: Re: [chimerax-users] using pandas
Hi Ilse,
You can install pandas into ChimeraX's Python using 'pip install' as described in this mailing-list message: https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2020-June/001216.html . The caveat is that though this will work on all platforms, the actual later "Import pandas" will fail on at least some Linux platforms because some of our Linux installers don't include the bz2 module in their Python, which pandas depends on. I will add you to the cc list for the ticket we have open for this problem, in case it matters to you.
--Eric
Eric Pettersen
UCSF Computer Graphics Lab
On Jun 9, 2021, at 3:09 AM, Lagerwaard, I.M. (Ilse) via ChimeraX-users <chimerax-users@cgl.ucsf.edumailto:chimerax-users@cgl.ucsf.edu> wrote:
Hello everyone,
Is it possible to use the pandas package in ChimeraX? I tried opening a Python script containing the line ‘import pandas’, but I get the error: ‘ModuleNotFoundError: No module named 'pandas'’.
Kind regards,
Ilse
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edumailto:ChimeraX-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimerax-users
Actually, come to think about it: the approach specified in https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2020-June/001216.html probably won't work for Windows, since on that platform sys.executable is ChimeraX.exe rather than ChimeraX-console.exe - and running "-m pip install ..." only works for the latter. ________________________________ From: Tristan Croll tic20@cam.ac.uk Sent: 10 June 2021 15:53 To: ChimeraX Users Help chimerax-users@cgl.ucsf.edu; Lagerwaard, I.M. (Ilse) i.m.lagerwaard@students.uu.nl Subject: Re: [chimerax-users] using pandas
I've had this problem before. The root cause turned out to be that "/path/to/ChimeraX/python3.8 -m pip install --user" installed to the Python user directory rather than the ChimeraX user directory. Try running:
"C:\Program Files\ChimeraX\bin\ChimeraX-console.exe" -m pip install --user pandas ________________________________ From: ChimeraX-users chimerax-users-bounces@cgl.ucsf.edu on behalf of Lagerwaard, I.M. (Ilse) via ChimeraX-users chimerax-users@cgl.ucsf.edu Sent: 10 June 2021 09:27 To: ChimeraX Users Help chimerax-users@cgl.ucsf.edu Subject: Re: [chimerax-users] using pandas
Hi Eric,
Thank you for the reply! Unfortunately, even though I followed your instructions and do have the bz2 module (I use Windows), I still get the same error. I can ‘import pandas’ in ChimeraX’s Python, but not from within the application itself. Do you have any idea what else might be going on?
Ilse
Van: Eric Pettersen pett@cgl.ucsf.edu Verzonden: 09 June 2021 19:12 Aan: Lagerwaard, I.M. (Ilse) i.m.lagerwaard@students.uu.nl CC: chimerax-users@cgl.ucsf.edu Onderwerp: Re: [chimerax-users] using pandas
Hi Ilse,
You can install pandas into ChimeraX's Python using 'pip install' as described in this mailing-list message: https://www.rbvi.ucsf.edu/pipermail/chimerax-users/2020-June/001216.html . The caveat is that though this will work on all platforms, the actual later "Import pandas" will fail on at least some Linux platforms because some of our Linux installers don't include the bz2 module in their Python, which pandas depends on. I will add you to the cc list for the ticket we have open for this problem, in case it matters to you.
--Eric
Eric Pettersen
UCSF Computer Graphics Lab
On Jun 9, 2021, at 3:09 AM, Lagerwaard, I.M. (Ilse) via ChimeraX-users <chimerax-users@cgl.ucsf.edumailto:chimerax-users@cgl.ucsf.edu> wrote:
Hello everyone,
Is it possible to use the pandas package in ChimeraX? I tried opening a Python script containing the line ‘import pandas’, but I get the error: ‘ModuleNotFoundError: No module named 'pandas'’.
Kind regards,
Ilse
_______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edumailto:ChimeraX-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimerax-users
Hi Ilse,
ChimeraX distributions include Python so you just want to install pandas into the ChimeraX Python. This involves running the ChimeraX Python and using pip install. Here is how I do that on Mac.
$ ~/Desktop/ChimeraX.app/Contents/bin/python3.8 -m pip install pandas
On Windows or Linux it would be similar. We should have a ChimeraX command to install PyPi packages but don't have that yet.
Tom
On Jun 9, 2021, at 3:09 AM, Lagerwaard, I.M. (Ilse) via ChimeraX-users chimerax-users@cgl.ucsf.edu wrote:
Hello everyone,
Is it possible to use the pandas package in ChimeraX? I tried opening a Python script containing the line ‘import pandas’, but I get the error: ‘ModuleNotFoundError: No module named 'pandas'’.
Kind regards, Ilse _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu mailto:ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
Hi Ilse,
On Windows I run a Command Prompt as administrator to have permission to modify the installed ChimeraX and use
cd C:\Program Files\ChimeraX-1.2.5\bin .\python.exe -m pip install pandas
And then I can use "import pandas" in the ChimeraX shell (menu Tools / General / Shell) without errors.
Or in a Command Prompt that is not run as administrator I run
cd C:\Program Files\ChimeraX-1.2.5\bin .\ChimeraX-console.exe -m pip install pandas --user
and again pandas installs fine and imports in ChimeraX.
Definitely we should add an easy way to do this in ChimeraX without the Command Prompt rigamarole, like a ChimeraX command "pip install pandas". But we don't have that right now. Sadly the Python pip package does not have an API to do installs using a function call -- really poor design. But probably we can work around that.
Tom
On Jun 9, 2021, at 10:27 AM, Tom Goddard goddard@sonic.net wrote:
Hi Ilse,
ChimeraX distributions include Python so you just want to install pandas into the ChimeraX Python. This involves running the ChimeraX Python and using pip install. Here is how I do that on Mac.
$ ~/Desktop/ChimeraX.app/Contents/bin/python3.8 -m pip install pandas
On Windows or Linux it would be similar. We should have a ChimeraX command to install PyPi packages but don't have that yet.
Tom
On Jun 9, 2021, at 3:09 AM, Lagerwaard, I.M. (Ilse) via ChimeraX-users <chimerax-users@cgl.ucsf.edu mailto:chimerax-users@cgl.ucsf.edu> wrote:
Hello everyone,
Is it possible to use the pandas package in ChimeraX? I tried opening a Python script containing the line ‘import pandas’, but I get the error: ‘ModuleNotFoundError: No module named 'pandas'’.
Kind regards, Ilse _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edu mailto:ChimeraX-users@cgl.ucsf.edu Manage subscription: https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users
Hi Tom,
Thanks a lot for the reply, my issue is solved now.
A pip install command would indeed be great! But for now the Command Prompt also works fine for me 😊.
Ilse
Van: Tom Goddard goddard@sonic.net Verzonden: 11 June 2021 06:47 Aan: Lagerwaard, I.M. (Ilse) i.m.lagerwaard@students.uu.nl CC: chimerax-users@cgl.ucsf.edu Onderwerp: Re: [chimerax-users] using pandas
Hi Ilse,
On Windows I run a Command Prompt as administrator to have permission to modify the installed ChimeraX and use
cd C:\Program Files\ChimeraX-1.2.5\bin .\python.exe -m pip install pandas
And then I can use "import pandas" in the ChimeraX shell (menu Tools / General / Shell) without errors.
Or in a Command Prompt that is not run as administrator I run
cd C:\Program Files\ChimeraX-1.2.5\bin .\ChimeraX-console.exe -m pip install pandas --user
and again pandas installs fine and imports in ChimeraX.
Definitely we should add an easy way to do this in ChimeraX without the Command Prompt rigamarole, like a ChimeraX command "pip install pandas". But we don't have that right now. Sadly the Python pip package does not have an API to do installs using a function call -- really poor design. But probably we can work around that.
Tom
On Jun 9, 2021, at 10:27 AM, Tom Goddard <goddard@sonic.netmailto:goddard@sonic.net> wrote:
Hi Ilse,
ChimeraX distributions include Python so you just want to install pandas into the ChimeraX Python. This involves running the ChimeraX Python and using pip install. Here is how I do that on Mac.
$ ~/Desktop/ChimeraX.app/Contents/bin/python3.8 -m pip install pandas
On Windows or Linux it would be similar. We should have a ChimeraX command to install PyPi packages but don't have that yet.
Tom
On Jun 9, 2021, at 3:09 AM, Lagerwaard, I.M. (Ilse) via ChimeraX-users <chimerax-users@cgl.ucsf.edumailto:chimerax-users@cgl.ucsf.edu> wrote:
Hello everyone,
Is it possible to use the pandas package in ChimeraX? I tried opening a Python script containing the line ‘import pandas’, but I get the error: ‘ModuleNotFoundError: No module named 'pandas'’.
Kind regards, Ilse _______________________________________________ ChimeraX-users mailing list ChimeraX-users@cgl.ucsf.edumailto:ChimeraX-users@cgl.ucsf.edu Manage subscription: https://plato.cgl.ucsf.edu/mailman/listinfo/chimerax-users
participants (4)
-
Eric Pettersen
-
Lagerwaard, I.M. (Ilse)
-
Tom Goddard
-
Tristan Croll