Python Forum
Installing mailjet_rest for Python 3 while Python 2 is installed
Thread Rating:
  • 1 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Installing mailjet_rest for Python 3 while Python 2 is installed
#1
I'm trying to convert my python script from version 2 to 3. I need mailjet_rest but I cannot figure out how to install it for version 3. When I run pip3 to install it, it tells me it is already installed for version 2. How can I install mailjet_rest so python 3 can find it and keep it for version 2 as well? TIA.
Reply
#2
To install mailjet_rest for Python 3 while keeping it for Python 2, follow these steps:

1. Check your Python 3 version and pip
Run the following to ensure you’re using Python 3’s pip:
`
python3 -m pip --version
`

2. Install mailjet_rest specifically for Python 3
`
python3 -m pip install mailjet_rest
`

3. Verify installation
After installation, check if Python 3 can find the package:
`
python3 -c "import mailjet_rest; print(mailjet_rest.__version__)"
`

4. Use a Virtual Environment (Recommended)
If you need both versions without conflicts, create a virtual environment for Python 3:
`
python3 -m venv myenv
source myenv/bin/activate # On Windows use: myenv\Scripts\activate
pip install mailjet_rest
`

This keeps dependencies isolated without affecting system-wide Python 2 installations.
snl_9527 likes this post
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Python Launcher (on Windows) only necessary when 2 or more Python versions installed? pstein 1 1,488 Feb-17-2024, 12:43 PM
Last Post: deanhystad
  Trouble with installing python domingo251 2 1,399 Sep-23-2023, 12:03 AM
Last Post: ICanIBB
  Installing python packages in a virtual environment Led_Zeppelin 1 1,660 Aug-15-2023, 08:18 PM
Last Post: deanhystad
  Advice for installing python app from github ? Adi44 6 3,831 Aug-07-2023, 06:34 PM
Last Post: snippsat
  Installing Python 3.8.11 from TGZ File michaelnicol 2 8,338 Jul-07-2023, 08:21 AM
Last Post: DeaD_EyE
  Installing Qt for Python. (On Windows 10) davediamond 22 8,201 Apr-18-2022, 06:50 AM
Last Post: ndc85430
Shocked Issues Installing Pyenv/Python 3.9.1 Brandon_Contactum 1 4,628 Feb-22-2022, 06:32 PM
Last Post: snippsat
  Installed versions of Python SamHobbs 5 3,780 Sep-02-2021, 02:28 PM
Last Post: jefsummers
  Although this is a talib related Q it's mostly related to python module installing.. Evalias123 4 8,154 Jan-10-2021, 11:39 PM
Last Post: Evalias123
  I seem to have two versions of python 3.7.9 installed miner_tom 7 6,203 Nov-22-2020, 06:42 PM
Last Post: miner_tom

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020