安装anaconda后再安装python,安装Anaconda后难以安装python模块

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.

94c523073baaf31f9f9bd60ae2190bf7.png

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!

解决方案

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.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值