jessismerkovitz
Posts: 6
Joined: Mon May 16, 2016 5:24 pm
Location: South Africa
Contact: Website

setup.py

Mon May 16, 2016 5:31 pm

I'm trying to install the

Code: Select all

sudo python setup.py install
and every time I press enter, I keep getting
python: can't open file 'setup.py': [Errno 2] No such file or directory
Basically I need this file because I am trying to get onto the Adafruit examples file but it keeps telling me there is no file or directories.

I have installed everything that needs to be installed such as the python smbus, dev etc.
Jess Smerkovitz

JimmyN
Posts: 1109
Joined: Wed Mar 18, 2015 7:05 pm
Location: Virginia, USA

Re: setup.py

Mon May 16, 2016 6:04 pm

Are you in the same directory where "setup.py" is located? If so you'll need to use

Code: Select all

sudo python ./setup.py install
The leading "./" tells it to run the setup.py file that's located in your current working directory.

Or you could use the full path

Code: Select all

sudo python /path/to/setup.py install

jessismerkovitz
Posts: 6
Joined: Mon May 16, 2016 5:24 pm
Location: South Africa
Contact: Website

Re: setup.py

Mon May 16, 2016 8:27 pm

Yes. I got it all working. Thank you.

Now I'm onto my next post already regarding my LCD 16x2 Pi plate.

If you think you could help- please check it out that would be great
Jess Smerkovitz

User avatar
Douglas6
Posts: 4874
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: setup.py

Mon May 16, 2016 9:25 pm

JimmyN wrote:Are you in the same directory where "setup.py" is located? If so you'll need to use

Code: Select all

sudo python ./setup.py install
If I'm not mistaken, Python will look in the current directory by default, no need for './'.

Return to “Beginners”