Code Monkey home page Code Monkey logo

mysh's Introduction

mysh

My shell scripts I use all the time, available on Github so I can pull them down quickly to multiple machines

Python3 / mython3 / mip3

After you install Python3 with Homebrew on a fresh install of macOS, trying to use pip3 results in an error like this:

× This environment is externally managed
╰─> To install Python packages system-wide, try brew install
    xyz, where xyz is the package you are trying to
    install.
    
    If you wish to install a Python library that isn't in Homebrew,
    use a virtual environment:

    ...

And on and on. So the solution is to symlink the simple scripts mython3 and mip3 into ~/bin/ which should be on your path, then run this command twice:

$ python3 -m venv ~/pyvenv

Which will make a user-specific virtual environment in ~/pyvenv

Note that for some reason you must run the command twice to get the activate script to appear so the mython3 and mip3 scritps work.

After that always use mython3 and mip3 intead of python3 and pip3 to have access to user-installed packages, installed with mip3 install xyz

Actually, in actual Python scripts, just use

#!/Users//pyvenv/bin/python3

and it will use your packages, installed with mip3 (mython3 cannot be used in #! in Pythons scripts for whatever reason).

mysh's People

Contributors

jupdike avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.