You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

能否将本地硬盘的.pdf/.csv等文件上传至VirtualBox虚拟机运行的Jupyter?

Absolutely! You can definitely upload local files like PDFs or CSVs to your Jupyter environment running inside a VirtualBox VM—here are two reliable, easy-to-follow methods to make it happen:

Method 1: VirtualBox Shared Folders (Great for Regular File Transfers)

This method creates a persistent link between your host machine and VM, so you can access local files anytime without re-uploading.

  • Set up the shared folder first:

    1. Shut down your VM if it’s running, then open the VirtualBox settings for that VM.
    2. Switch to the Shared Folders tab.
    3. Click the "+" icon (Add Shared Folder) in the top-right corner.
    4. For the host path, browse to the local folder where your PDFs/CSVs are stored.
    5. Check the Auto-mount and Make Permanent boxes—this ensures the folder stays accessible every time you boot the VM.
    6. Save the settings and start your VM back up.
  • Access the shared folder in Jupyter:

    1. Launch Jupyter Notebook or Lab in your VM.
    2. In the Jupyter file browser, navigate to the mounted shared folder. On Linux VMs, this is typically /media/sf_YourFolderName (replace YourFolderName with the name you gave the shared folder). On Windows VMs, it’ll show up as a mapped drive letter (like Z:).
    3. From here, you can copy, move, or open your local files directly in your Jupyter workspace.
Method 2: Jupyter’s Built-in Upload (Perfect for One-Time File Transfers)

If you just need to upload a few files quickly, Jupyter’s native upload feature works seamlessly even across the VM boundary:

  1. Launch Jupyter Notebook or Lab in your VM.
  2. In the Jupyter file browser, look for the Upload button. For Notebook, it’s usually in the top-right corner; for Lab, check the file menu or toolbar.
  3. Click the button, then select the local PDFs/CSVs from your host machine’s hard drive.
  4. Wait a few seconds for the upload to finish—you’ll see the files appear in your Jupyter workspace once it’s done.

Pro Tip: If you’re using a Linux-based VM and get permission errors when accessing the shared folder, run this command in the VM’s terminal to add your user to the required group:
sudo usermod -aG vboxsf your_username
Log out and back in to apply the change, and you’ll have full access.

内容的提问来源于stack exchange,提问作者J. Serra

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 04:16:18