简体   繁体   中英

Install Package in Python

I'm trying to install bayespy on enthought canopy and have read through all the documentation and cannot figure it out. I import pip and then run the following code (I have tried many variations on this too) :

pip install <bayespy>

It keeps coming back with an error message. Do I need to specify the file path to bayespy possibly?

Thanks in advance, Max

Edit :

pip install <bayespy>
  File "<ipython-input-2-bb1febf67aaf>", line 1
   pip install <bayespy>
          ^
SyntaxError: invalid syntax

The most basic usage of "pip" is as a command-line tool. Try this from the command prompt (NOT within a Python shell):

pip install bayespy

or perhaps

sudo pip install bayespy

First: BayesPy requires Python 3. Try This:

yourMachine> sudo pip3 install bayespy

Not this at python prompt: >>> sudo pip3 install bayespy

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM