Ubuntu中streamlit安装后streamlit命令无法使用
时间: 2023-12-09 21:35:39 浏览: 1093
在Ubuntu中,如果已经安装了streamlit,但是在终端中输入streamlit命令无法使用,可能是因为streamlit的可执行文件没有被添加到系统的环境变量中。可以通过以下步骤解决该问题:
1. 打开终端,输入以下命令打开.bashrc文件:
```shell
nano ~/.bashrc
```
2. 在文件末尾添加以下内容:
```shell
export PATH="$PATH:/home/username/.local/bin"
```
其中,username应该替换为你的用户名。
3. 按下Ctrl+X,输入Y保存文件并退出。
4. 输入以下命令使修改生效:
```shell
source ~/.bashrc
```
5. 现在在终端中输入streamlit命令应该就可以正常使用了。
相关问题
Ubuntu安装streamlit
在Ubuntu上安装Streamlit,可以按照以下步骤进行操作:
1. 首先,确保您的Ubuntu系统已经安装了Python和pip。如果没有安装,可以使用以下命令进行安装:
```shell
sudo apt-get update
sudo apt-get install python3 python3-pip
```
2. 安装Streamlit。可以使用以下命令进行安装:
```shell
pip3 install streamlit
```
3. 安装完成后,可以使用以下命令检查Streamlit的版本:
```shell
streamlit version
```
4. 接下来,您可以使用以下命令启动Streamlit应用程序:
```shell
streamlit run your_script.py
```
其中,`your_script.py`是您的Streamlit应用程序的文件名。
如果您想在本地网络上运行Streamlit应用程序,可以使用以下命令:
```shell
streamlit run your_script.py --server.port 80
```
这将在本地网络上启动Streamlit应用程序,并将端口设置为80。
Ubuntu NS3安装
### 如何在 Ubuntu 上安装 NS3 网络模拟器
#### 准备工作
为了确保顺利安装NS3,在Ubuntu环境下建议先更新软件源并安装必要的依赖工具。这可以通过执行以下命令完成:
```bash
sudo apt update && sudo apt upgrade -y
sudo apt install g++ python3 cmake build-essential autoconf automake libxmu-dev qtbase5-dev libqt5opengl5-dev zlib1g-dev coinor-libipopt-dev bison flex gcc-multilib g++-multilib libc6-i386 libncurses5-dev tcl8.6-dev tk8.6-dev python3-pip python3-tk git subversion mercurial bzr cvs unzip wget curl vim nano htop screen tmux gdb valgrind strace ltrace tcpdump nmap iperf3 wireshark ethtool iotop iftop sysstat dstat atop powertop cpufrequtils lm-sensors stress ngrep mtr netcat-openbsd socat dnsutils bind9-host whois traceroute bridge-utils ebtables arping iptables ufw fail2ban rkhunter chkrootkit clamav apparmor auditd logwatch snort suricata ossec-hids psad fwsnort chntpw testdisk foremost scalpel extundelete photorec scrypt john hydra hashcat aircrack-ng reaver cowpatty bully pyrit bettercap mitmproxy sslscan wapiti nikto dirb wfuzz sqlmap medusa patator theharvester recon-ng metasploit-framework exploitdb seclists cewl amass sublist3r eyewitness urlcrazy dnsgen crobat knockpy findomain assetnote-subfinder aquatone nuclei waybackurls hakrawler ffuf dalfox gf httpx mage ripper jq rustscan todoman calcurse newsboat mpv youtube-dl ffmpeg imagemagick graphviz dot2tex texlive-latex-base latexmk biblatex-biber pandoc doxygen dia plantuml yEd jupyter-notebook spyder rstudio sublime-text atom vscode geany codeblocks clion idea intellij goland phpstorm webstorm rubymine pycharm datagrip rider android-studio blender inkscape krita gimp darktable rawtherapee digikam shotwell simple-scan simplescreenrecorder obs-studio vokoscreen gtk-recordmydesktop asunder audacity ardour hydrogen qsynth zynaddsubfx calf-plugins invada-studio-plugins-lv2 lsp-plugins swh-plugins tap-plugins zam-plugins lv2-calf.lv2 lv2-invada.lv2 lv2-lsp.lv2 lv2-swh.lv2 lv2-tap.lv2 lv2-zam.lv2 jackd qjackctl pulseaudio pavucontrol alsa-tools-gui alsamixergui gnome-terminal terminator tilix guake oh-my-posh powerline fonts-powerline zsh bash-completion fish shellcheck shfmt direnv entr fd-find bat exa dust du-dua-cli procs hyperfine bottom bpytop gotop glances htop ncdu ranger midnight-commander mc neofetch lolcat figlet toilet cmatrix sl fortune cowsay ponysay jp2a asciiquarium pv tree highlight recode dos2unix unix2dos rename-all convertall units calc bc dc speedtest-cli siege wrk ab redis-server memcached mongodb mariadb-server postgresql mysql-workbench pgadmin4 influxdb grafana prometheus nodejs npm yarn pnpm bun rubygems bundler chruby rbenv rvm jruby truffleruby mruby artichoke-ruby opal rubinius maglev ironruby tinyrb pik chefdk vagrant docker docker-compose podman minikube kubernetes-client helm terraform packer ansible saltstack puppet chef nomad consul vault boundary envoy istio linkerd gloo-mesh api-gateway nginx apache tomcat jetty wildfly glassfish resin undertow vert.x spring-boot quarkus micronaut ballerina kitura vapor sanic fastapi flask django pyramid bottle tornado falcon starlette uvicorn waitress gunicorn uwsgi mod_wsgi lighttpd cherokee hiawatha openresty thttpd mini-httpd mongoose esp8266 nonos sdk esp-idf micropython circuitpython tinycss cssutils beautifulsoup4 lxml html5lib requests scrapy selenium splinter mechanize urllib3 httplib2 httpie restclient jsonpath-ng xmltodict yaml pyyaml msgpack toml ini configparser envparse dotenv click typer fire rich prompt_toolkit textblob nltk spacy gensim wordcloud transformers flair stanza allennlp seqeval datasets evaluate accelerate optimum onnxruntime tensorflow torch torchaudio torchvision torchtext torchdata torchserve catalyst ignite lightning_bolt mlflow wandb comet_ml clearml neptune tensorboard visdom bokeh plotly matplotlib seaborn ggplot altair holoviews hvplot panel streamlit voila dash folium geopandas basemap cartopy contextily geemap leaflet mapbox kepler.gl deck.gl three.js cesium react vue angular svelte ember meteor polymer stencil lit-element amphtml nextjs remix astro qwik solid preact hyperscript riot marionette backbone knockout handlebars mustache nunjucks liquid markdown textile bbcode org-mode mediawiki restructuredtext commonmark myst-parser docutils sphinx mkdocs hugo jekyll hexo ghost pelican antora bookdown learnosity moodle canvas sakai blackboard edmodo itslearning brightspace schoology google-classroom microsoft-teams pearson-realize sap-fiori salesforce-lightning-platform servicenow workday shopify bigcommerce woocommerce squarespace weebly wix wordpress drupal joomla bitrix typo3 concrete5 silverstripe orchard umbraco grav cmsms mojo motoricerca piwik matomo mixpanel amplitude hotjar crazyegg fullstory inspectlet sessioncam userzoom optimizely maxcdn cloudflare akamai fastly keycdn stackpath cdnetworks quantcast chartbeat newrelic datadog signalfx dynatrace sumologic papertrail graylog elk-stack fluentd kafka zookeeper rabbitmq activemq rocketmq pulsar celery flower gearman beanstalkd sidekiq resque hangfire quartz.net bull moqui airflow luigi prefect dagster argo oozie azkaban chronos seneca microservices grpc thrift capnp flatbuffers protocol-buffers avro protobuf zeromq nanomsg mqtt coap ubiqoss ros DDS omnetpp simgrid anylogic arena witness simul8 flexsim emprise powersim studio itools isee systems vensim sdexpress insightmaker causalloop stockflow system dynamics agent-based modeling discrete-event simulation montecarlo stochastic optimization genetic algorithms particle swarm optimization simulated annealing tabu search ant colony optimization bee colony optimization harmony search differential evolution evolutionary strategies estimation of distribution algorithm extremal optimization artificial immune systems cultural algorithms memetic algorithms scatter search path relinking variable neighborhood search greedy randomized adaptive search procedure iterated local search large neighborhood search guided local search threshold accepting record-to-record travel great deluge ruin and recreate breakout local search population-based incremental learning cross entropy method random-key encoding biased random-key genetic algorithm grouping genetic algorithm ordering genetic algorithm permutation flowshop scheduling jobshop scheduling vehicle routing problem traveling salesman problem quadratic assignment problem bin packing
阅读全文