0

I just started working with anaconda. Earlier I was working with Python 2.7 on my system. I was writing a script for devices connected to my laptop via usb. For this, I needed the usb module/package. I initially tried doing in Python 27. I installed using:

easy_install libusb1

The output with this is ( screenshot is also there) :

Searching for libusb1
Best match: libusb1 1.4.0
Processing libusb1-1.4.0-py3.4.egg
libusb1 1.4.0 is already the active version in easy-install.pth

Using c:\users\eku\anaconda3\lib\site-packages\libusb1-1.4.0-py3.4.egg
Processing dependencies for libusb1
Finished processing dependencies for libusb1

C:\users\eku\anaconda3\ : this is the path according to my system whose name is eku.

Installing with pip shows an error unknown command libusb1

Because I have installed the package before, the screenshot shows the correct result that the package is already installed. But the locatio is where my anaconda's site-packages are there.

enter image description here

Why is this occurring and how should I correct this. I want to keep both anaconda and the other 2.7 version separate. (If this has something to do with path variable, then yes I am confused about the same).

As can be seen from the above output the libusb gets installed in in anaconda, I tried running the same code in Spyder (in anaconda). When I write,

import usb1

I get the error:

ImportError: No module named 'usb1'

Why is this happening?

My spyder got installed with anaconda itself. I simply click on its icon and the workspace launches. Nothing more I had to do, it started working and even my other files are working fine.

Thanks!

user3004790
  • 748
  • 7
  • 10
  • This question probably needs some rewriting before it can be answered. A couple of things here: Don't use `easy_install` use `pip`. `pip`'s error messages are usually much more informative. Also please do not include output or code in form of an image - images are not indexed, so it is much harder for others with a similar problem to find your question. It's also important to know how you installed `spyder` - Do you use anaconda's version or your own? – cel Jun 10 '15 at 16:10
  • I edited the above. Please see, thanks for the corrections. – user3004790 Jun 10 '15 at 17:54
  • can you try: pip show libusb1. Your question is not clear. What distribution do you want to use for your libusb, anaconda or the other? Spyder is not magic, it is based on a user defined interpreter, it should be anaconda but you can change. – Kirell Jun 10 '15 at 17:59
  • I want to use libusb for the other(Python 2.7), but the location where it gets installed as we can see in the screenshot or output is in the packages of anaconda. I want to keep spyder for anaconda only, on executing pip show libusb1, it gives the following: ' Name: libusb1 Version: 1.4.0 Location: c:\users\eku\anaconda3\lib\site-packages\libusb1-1.4.0-py3.4.egg Requires: ' – user3004790 Jun 10 '15 at 18:11

1 Answers1

0

I know it's a bit after the fact, but I had the same issue. I ended up searching my registry (I used a program called RegistryFinder, there are likely others) and finding that there was a registry value pointing to the Anaconda install directory. I deleted it and I was able to install things to my normal Python directory. I had previously uninstalled Anaconda and wasn't worried about having references to it, so you may want to save off those values.

Bryce G.
  • 1
  • 1
  • 2