Difficulty installing python modules after installing anaconda

850 views Asked by At

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!

1

There are 1 answers

0
Bryce G. On

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.