Source Distribution Broken For 1.212.0

by ADMIN 39 views

Introduction

The recent release of v1.212.0 for the Nautilus Trader project has been published to PyPI, but unfortunately, it has been affected by a reshuffling of the project structure. This change has resulted in necessary files not being included in the source distributions. As a result, users attempting to install the package from an sdist (source distribution) are encountering an error.

The Error: Could Not Find Cargo.toml

When trying to install the Nautilus Trader package from an sdist, users are met with the following error message:

[stderr]
error: could not find `Cargo.toml`

This error is a direct result of the missing files in the source distribution. The Cargo.toml file is a crucial component of the project, and its absence is causing the installation process to fail.

The Impact: Only Affects Unofficially Supported Platforms

It's essential to note that this issue only affects platforms that are not officially supported by the project. These platforms lack binary wheels on PyPI, which are necessary for a smooth installation process. Users on officially supported platforms will not encounter this issue.

Resolving the Issue: Installation Options

Fortunately, there are two viable options to resolve this issue:

Option 1: Install Directly from the Source

One way to install the Nautilus Trader package is by cloning the repository directly from GitHub. This approach includes the missing files, ensuring a successful installation process. To do this, follow these steps:

  • Clone the repository using the following command: git clone https://github.com/nautechsystems/nautilus_trader.git
  • Navigate to the cloned repository: cd nautilus_trader
  • Install the package using pip: pip install .

By installing directly from the source, you can bypass the issue caused by the missing files in the source distribution.

Option 2: Install an Earlier Version

Another option is to install an earlier version of the Nautilus Trader package. This approach will ensure that you have access to the necessary files, allowing for a successful installation process. To install an earlier version, follow these steps:

  • Check the available versions on PyPI: pip show nautilus-trader
  • Install the desired version using pip: pip install nautilus-trader==<version>

By installing an earlier version, you can avoid the issue caused by the missing files in the source distribution.

Conclusion

Q: What is the cause of the issue with the source distribution for 1.212.0?

A: The issue is caused by a reshuffling of the project structure, which resulted in necessary files not being included in the source distributions.

Q: What error message am I seeing when trying to install from an sdist?

A: You are seeing the following error message:

[stderr]
error: could not find `Cargo.toml`

Q: Why is this issue only affecting platforms that are not officially supported?

A: This issue is only affecting platforms that are not officially supported because they lack binary wheels on PyPI, which are necessary for a smooth installation process.

Q: How can I resolve this issue?

A: There are two viable options to resolve this issue:

  • Install directly from the source by cloning the repository and installing the package using pip.
  • Install an earlier version of the Nautilus Trader package.

Q: How do I install directly from the source?

A: To install directly from the source, follow these steps:

  • Clone the repository using the following command: git clone https://github.com/nautechsystems/nautilus_trader.git
  • Navigate to the cloned repository: cd nautilus_trader
  • Install the package using pip: pip install .

Q: How do I install an earlier version of the Nautilus Trader package?

A: To install an earlier version of the Nautilus Trader package, follow these steps:

  • Check the available versions on PyPI: pip show nautilus-trader
  • Install the desired version using pip: pip install nautilus-trader==<version>

Q: Is there a plan to address this issue in the next release?

A: Yes, we are working to accelerate the next release to address this issue promptly and ensure a smooth installation process for all users.

Q: Will this issue affect users on officially supported platforms?

A: No, this issue will not affect users on officially supported platforms, as they have access to binary wheels on PyPI.

Q: Can I get help with resolving this issue?

A: Yes, you can reach out to the project maintainers or the community for assistance with resolving this issue.

Q: How can I stay up-to-date with the latest developments on the Nautilus Trader project?

A: You can stay up-to-date with the latest developments on the Nautilus Trader project by following the project's GitHub repository, signing up for the project's newsletter, or joining the project's community forum.