Skip to content

Fail to install MCP342X in Raspberry Pi 3B. #4

@def-fun

Description

@def-fun

I have tried:

wget https://github.com/stevemarple/python-MCP342x/archive/master.zip
unzip master.zip
cd python-MCP342x-master/
sudo python setup.py install

I got this:

==================================
['MCP342x']
==================================
running install
Checking .pth file support in /usr/local/lib/python3.5/dist-packages/
/usr/bin/python3 -E -c pass
TEST PASSED: /usr/local/lib/python3.5/dist-packages/ appears to support .pth files
running bdist_egg
running egg_info
writing dependency_links to MCP342x.egg-info/dependency_links.txt
writing top-level names to MCP342x.egg-info/top_level.txt
writing MCP342x.egg-info/PKG-INFO
writing requirements to MCP342x.egg-info/requires.txt
reading manifest file 'MCP342x.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no files found matching 'MCP342x/examples/convert_read_many.py'
writing manifest file 'MCP342x.egg-info/SOURCES.txt'
installing library code to build/bdist.linux-armv7l/egg
running install_lib
running build_py
creating build/lib
creating build/lib/MCP342x
copying MCP342x/init.py -> build/lib/MCP342x
creating build/bdist.linux-armv7l/egg
creating build/bdist.linux-armv7l/egg/MCP342x
copying build/lib/MCP342x/init.py -> build/bdist.linux-armv7l/egg/MCP342x
byte-compiling build/bdist.linux-armv7l/egg/MCP342x/init.py to init.cpython-35.pyc
creating build/bdist.linux-armv7l/egg/EGG-INFO
copying MCP342x.egg-info/PKG-INFO -> build/bdist.linux-armv7l/egg/EGG-INFO
copying MCP342x.egg-info/SOURCES.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying MCP342x.egg-info/dependency_links.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying MCP342x.egg-info/requires.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
copying MCP342x.egg-info/top_level.txt -> build/bdist.linux-armv7l/egg/EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating 'dist/MCP342x-0.3.4-py3.5.egg' and adding 'build/bdist.linux-armv7l/egg' to it
removing 'build/bdist.linux-armv7l/egg' (and everything under it)
Processing MCP342x-0.3.4-py3.5.egg
Removing /usr/local/lib/python3.5/dist-packages/MCP342x-0.3.4-py3.5.egg
Copying MCP342x-0.3.4-py3.5.egg to /usr/local/lib/python3.5/dist-packages
MCP342x 0.3.4 is already the active version in easy-install.pth

Installed /usr/local/lib/python3.5/dist-packages/MCP342x-0.3.4-py3.5.egg
Processing dependencies for MCP342x==0.3.4
Searching for smbus
Reading https://pypi.python.org/simple/smbus/
Couldn't find index page for 'smbus' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
No local packages or download links found for smbus
error: Could not find suitable distribution for Requirement.parse('smbus')

and I have tried this, too:

sudo pip install MCP342x

and I got:

The directory '/home/pi/.cache/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/home/pi/.cache/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
Collecting MCP342x
Downloading MCP342x-0.3.4.tar.gz
Collecting smbus (from MCP342x)
Could not find a version that satisfies the requirement smbus (from MCP342x) (from versions: )
No matching distribution found for smbus (from MCP342x)
You are using pip version 8.1.1, however version 9.0.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.

It seems that there is something wrong with smbus .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions