0

I downloaded and installed python3.3 from the website and followed the instructions in the readme file.

I can run python3.3 from commandline, but when I try to install a package with pip, it will install to the default python (Anaconda python 3.6 in my case).

I tried installing a new pip using easy_install as described here, but it gives me the error saying

/usr/local/bin/python3.3: No module named easy_install

How can I install the setuptools if I don't have pip?

1

2 Answers 2

0

I solved my problem by using the virtualenv from anaconda directly as described here.

conda create -n py33 python=3.3 anaconda

This will also setup pip, so installation of new packages is possible.

Sign up to request clarification or add additional context in comments.

Comments

0

Does your Anaconda distribution (Python 3.6) have pip installed already? If yes, you can use virtualenv as virtual environment.

  1. Check if you have virtualenv installed. In my computer, I have virtualenv 16.0.0 installed.

    $ virtualenv --version
    16.0.0
    

    If it says, "command not found", you can install virtualenv.

    $ pip3 install virtualenv
    
  2. Once virtualenv is installed, create a new virtual environment, with Python 3.3. In the command below, we will create a new virtual environment called venv, that uses Python 3.3.

    $ virtualenv --python=/usr/bin/python3.3 <path/to/new/virtualenv/> venv
    

    If it says the path does not exist, check the path to python 3.3 using which command.

    $ which python3.3
    
  3. Activate the the virtual environment venv. The commands are activate to activate and deactivate to deactivate.

    $ source venv/bin/activate
    
  4. Install the package that you want.

    $ pip3 install X
    
  5. Once you are done and what to use the default Python 3.6, deactivate the virtual environment.

@aeduG's answer is correct. Alternatively, you can use virtualenv. See here for the differences between conda virtual environment and virtualenv.

See here if you want to use conda's virtual environment instead.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.