How do I access packages installed by `pip --user`?

前端 未结 3 1113
我在风中等你
我在风中等你 2020-12-14 08:16

I realized I had an outdated numpy version:

$ python
Python 2.7.10 (default, Oct 23 2015, 18:05:06)
[GCC 4.2.1 Compa         


        
3条回答
  •  醉话见心
    2020-12-14 09:18

    I installed packages with sudo pip install --user option and I had to do sudo python to get it working.

    vishnu$ echo $PATH
    /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
    

    With sudo:

    vishnu$ sudo python
    Python 2.7.10 (default, Jul 15 2017, 17:16:57) 
    [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import rasa_core
    >>> 
    

    Without sudo:

    vishnu$ python
    Python 2.7.10 (default, Jul 15 2017, 17:16:57) 
    [GCC 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.31)] on darwin
    Type "help", "copyright", "credits" or "license" for more information.
    >>> import rasa_core
    Traceback (most recent call last):
      File "", line 1, in 
    ImportError: No module named rasa_core
    

    PS: I am running these on Mac OS High Sierra and my issue was with rasa_core and dependent packages.

提交回复
热议问题